| @@ 251-272 (lines=22) @@ | ||
| 248 | $table->setPrimaryKey(['gid']); |
|
| 249 | } |
|
| 250 | ||
| 251 | if (!$schema->hasTable('preferences')) { |
|
| 252 | $table = $schema->createTable('preferences'); |
|
| 253 | $table->addColumn('userid', 'string', [ |
|
| 254 | 'notnull' => true, |
|
| 255 | 'length' => 64, |
|
| 256 | 'default' => '', |
|
| 257 | ]); |
|
| 258 | $table->addColumn('appid', 'string', [ |
|
| 259 | 'notnull' => true, |
|
| 260 | 'length' => 32, |
|
| 261 | 'default' => '', |
|
| 262 | ]); |
|
| 263 | $table->addColumn('configkey', 'string', [ |
|
| 264 | 'notnull' => true, |
|
| 265 | 'length' => 64, |
|
| 266 | 'default' => '', |
|
| 267 | ]); |
|
| 268 | $table->addColumn('configvalue', 'text', [ |
|
| 269 | 'notnull' => false, |
|
| 270 | ]); |
|
| 271 | $table->setPrimaryKey(['userid', 'appid', 'configkey']); |
|
| 272 | } |
|
| 273 | ||
| 274 | if (!$schema->hasTable('properties')) { |
|
| 275 | $table = $schema->createTable('properties'); |
|
| @@ 572-591 (lines=20) @@ | ||
| 569 | $table->addIndex(['category'], 'category_index'); |
|
| 570 | } |
|
| 571 | ||
| 572 | if (!$schema->hasTable('vcategory_to_object')) { |
|
| 573 | $table = $schema->createTable('vcategory_to_object'); |
|
| 574 | $table->addColumn('objid', 'integer', [ |
|
| 575 | 'notnull' => true, |
|
| 576 | 'length' => 4, |
|
| 577 | 'default' => 0, |
|
| 578 | ]); |
|
| 579 | $table->addColumn('categoryid', 'integer', [ |
|
| 580 | 'notnull' => true, |
|
| 581 | 'length' => 4, |
|
| 582 | 'default' => 0, |
|
| 583 | ]); |
|
| 584 | $table->addColumn('type', 'string', [ |
|
| 585 | 'notnull' => true, |
|
| 586 | 'length' => 64, |
|
| 587 | 'default' => '', |
|
| 588 | ]); |
|
| 589 | $table->setPrimaryKey(['categoryid', 'objid', 'type']); |
|
| 590 | $table->addIndex(['objid', 'type'], 'vcategory_objectd_index'); |
|
| 591 | } |
|
| 592 | ||
| 593 | if (!$schema->hasTable('systemtag')) { |
|
| 594 | $table = $schema->createTable('systemtag'); |
|