| @@ 209-223 (lines=15) @@ | ||
| 206 | $table->addIndex(['storage', 'size', 'fileid'], 'fs_storage_size'); |
|
| 207 | } |
|
| 208 | ||
| 209 | if (!$schema->hasTable('group_user')) { |
|
| 210 | $table = $schema->createTable('group_user'); |
|
| 211 | $table->addColumn('gid', 'string', [ |
|
| 212 | 'notnull' => true, |
|
| 213 | 'length' => 64, |
|
| 214 | 'default' => '', |
|
| 215 | ]); |
|
| 216 | $table->addColumn('uid', 'string', [ |
|
| 217 | 'notnull' => true, |
|
| 218 | 'length' => 64, |
|
| 219 | 'default' => '', |
|
| 220 | ]); |
|
| 221 | $table->setPrimaryKey(['gid', 'uid']); |
|
| 222 | $table->addIndex(['uid'], 'gu_uid_index'); |
|
| 223 | } |
|
| 224 | ||
| 225 | if (!$schema->hasTable('group_admin')) { |
|
| 226 | $table = $schema->createTable('group_admin'); |
|
| @@ 225-239 (lines=15) @@ | ||
| 222 | $table->addIndex(['uid'], 'gu_uid_index'); |
|
| 223 | } |
|
| 224 | ||
| 225 | if (!$schema->hasTable('group_admin')) { |
|
| 226 | $table = $schema->createTable('group_admin'); |
|
| 227 | $table->addColumn('gid', 'string', [ |
|
| 228 | 'notnull' => true, |
|
| 229 | 'length' => 64, |
|
| 230 | 'default' => '', |
|
| 231 | ]); |
|
| 232 | $table->addColumn('uid', 'string', [ |
|
| 233 | 'notnull' => true, |
|
| 234 | 'length' => 64, |
|
| 235 | 'default' => '', |
|
| 236 | ]); |
|
| 237 | $table->setPrimaryKey(['gid', 'uid']); |
|
| 238 | $table->addIndex(['uid'], 'group_admin_uid'); |
|
| 239 | } |
|
| 240 | ||
| 241 | if (!$schema->hasTable('groups')) { |
|
| 242 | $table = $schema->createTable('groups'); |
|
| @@ 431-448 (lines=18) @@ | ||
| 428 | $table->addIndex(['class'], 'job_class_index'); |
|
| 429 | } |
|
| 430 | ||
| 431 | if (!$schema->hasTable('users')) { |
|
| 432 | $table = $schema->createTable('users'); |
|
| 433 | $table->addColumn('uid', 'string', [ |
|
| 434 | 'notnull' => true, |
|
| 435 | 'length' => 64, |
|
| 436 | 'default' => '', |
|
| 437 | ]); |
|
| 438 | $table->addColumn('displayname', 'string', [ |
|
| 439 | 'notnull' => false, |
|
| 440 | 'length' => 64, |
|
| 441 | ]); |
|
| 442 | $table->addColumn('password', 'string', [ |
|
| 443 | 'notnull' => true, |
|
| 444 | 'length' => 255, |
|
| 445 | 'default' => '', |
|
| 446 | ]); |
|
| 447 | $table->setPrimaryKey(['uid']); |
|
| 448 | } |
|
| 449 | ||
| 450 | if (!$schema->hasTable('authtoken')) { |
|
| 451 | $table = $schema->createTable('authtoken'); |
|
| @@ 781-799 (lines=19) @@ | ||
| 778 | $table->addIndex(['user'], 'credentials_user'); |
|
| 779 | } |
|
| 780 | ||
| 781 | if (!$schema->hasTable('admin_sections')) { |
|
| 782 | $table = $schema->createTable('admin_sections'); |
|
| 783 | $table->addColumn('id', 'string', [ |
|
| 784 | 'notnull' => true, |
|
| 785 | 'length' => 64, |
|
| 786 | ]); |
|
| 787 | $table->addColumn('class', 'string', [ |
|
| 788 | 'notnull' => true, |
|
| 789 | 'length' => 255, |
|
| 790 | 'default' => '', |
|
| 791 | ]); |
|
| 792 | $table->addColumn('priority', 'smallint', [ |
|
| 793 | 'notnull' => true, |
|
| 794 | 'length' => 1, |
|
| 795 | 'default' => 0, |
|
| 796 | ]); |
|
| 797 | $table->setPrimaryKey(['id']); |
|
| 798 | $table->addUniqueIndex(['class'], 'admin_sections_class'); |
|
| 799 | } |
|
| 800 | ||
| 801 | if (!$schema->hasTable('admin_settings')) { |
|
| 802 | $table = $schema->createTable('admin_settings'); |
|
| @@ 827-845 (lines=19) @@ | ||
| 824 | $table->addIndex(['section'], 'admin_settings_section'); |
|
| 825 | } |
|
| 826 | ||
| 827 | if (!$schema->hasTable('personal_sections')) { |
|
| 828 | $table = $schema->createTable('personal_sections'); |
|
| 829 | $table->addColumn('id', 'string', [ |
|
| 830 | 'notnull' => true, |
|
| 831 | 'length' => 64, |
|
| 832 | ]); |
|
| 833 | $table->addColumn('class', 'string', [ |
|
| 834 | 'notnull' => true, |
|
| 835 | 'length' => 255, |
|
| 836 | 'default' => '', |
|
| 837 | ]); |
|
| 838 | $table->addColumn('priority', 'smallint', [ |
|
| 839 | 'notnull' => true, |
|
| 840 | 'length' => 1, |
|
| 841 | 'default' => 0, |
|
| 842 | ]); |
|
| 843 | $table->setPrimaryKey(['id']); |
|
| 844 | $table->addUniqueIndex(['class'], 'personal_sections_class'); |
|
| 845 | } |
|
| 846 | ||
| 847 | if (!$schema->hasTable('personal_settings')) { |
|
| 848 | $table = $schema->createTable('personal_settings'); |
|