| @@ 102-124 (lines=23) @@ | ||
| 99 | $table->setPrimaryKey(['circle_id', 'user_id']); |
|
| 100 | } |
|
| 101 | ||
| 102 | if (!$schema->hasTable('circles_groups')) { |
|
| 103 | $table = $schema->createTable('circles_groups'); |
|
| 104 | $table->addColumn('circle_id', 'string', [ |
|
| 105 | 'notnull' => true, |
|
| 106 | 'length' => 64, |
|
| 107 | ]); |
|
| 108 | $table->addColumn('group_id', 'string', [ |
|
| 109 | 'notnull' => true, |
|
| 110 | 'length' => 64, |
|
| 111 | ]); |
|
| 112 | $table->addColumn('level', 'smallint', [ |
|
| 113 | 'notnull' => true, |
|
| 114 | 'length' => 1, |
|
| 115 | ]); |
|
| 116 | $table->addColumn('note', 'string', [ |
|
| 117 | 'notnull' => false, |
|
| 118 | 'length' => 255, |
|
| 119 | ]); |
|
| 120 | $table->addColumn('joined', 'datetime', [ |
|
| 121 | 'notnull' => false, |
|
| 122 | ]); |
|
| 123 | $table->setPrimaryKey(['circle_id', 'group_id']); |
|
| 124 | } |
|
| 125 | ||
| 126 | if (!$schema->hasTable('circles_clouds')) { |
|
| 127 | $table = $schema->createTable('circles_clouds'); |
|
| @@ 126-148 (lines=23) @@ | ||
| 123 | $table->setPrimaryKey(['circle_id', 'group_id']); |
|
| 124 | } |
|
| 125 | ||
| 126 | if (!$schema->hasTable('circles_clouds')) { |
|
| 127 | $table = $schema->createTable('circles_clouds'); |
|
| 128 | $table->addColumn('cloud_id', 'string', [ |
|
| 129 | 'notnull' => true, |
|
| 130 | 'length' => 64, |
|
| 131 | ]); |
|
| 132 | $table->addColumn('address', 'string', [ |
|
| 133 | 'notnull' => true, |
|
| 134 | 'length' => 128, |
|
| 135 | ]); |
|
| 136 | $table->addColumn('status', 'smallint', [ |
|
| 137 | 'notnull' => true, |
|
| 138 | 'length' => 1, |
|
| 139 | ]); |
|
| 140 | $table->addColumn('note', 'string', [ |
|
| 141 | 'notnull' => false, |
|
| 142 | 'length' => 255, |
|
| 143 | ]); |
|
| 144 | $table->addColumn('created', 'datetime', [ |
|
| 145 | 'notnull' => false, |
|
| 146 | ]); |
|
| 147 | $table->setPrimaryKey(['cloud_id']); |
|
| 148 | } |
|
| 149 | ||
| 150 | if (!$schema->hasTable('circles_shares')) { |
|
| 151 | $table = $schema->createTable('circles_shares'); |
|