@@ -27,5 +27,5 @@ |
||
| 27 | 27 | * General factory for the text model. |
| 28 | 28 | */ |
| 29 | 29 | $fm->define('OCA\Polls\Db\Text')->setDefinitions([ |
| 30 | - 'text' => Faker::text(255) |
|
| 30 | + 'text' => Faker::text(255) |
|
| 31 | 31 | ]); |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | * General factory for the participation text model. |
| 28 | 28 | */ |
| 29 | 29 | $fm->define('OCA\Polls\Db\ParticipationText')->setDefinitions([ |
| 30 | - 'text' => Faker::text(255), |
|
| 31 | - 'userId' => Faker::firstNameMale(), |
|
| 32 | - 'type' => 0 |
|
| 30 | + 'text' => Faker::text(255), |
|
| 31 | + 'userId' => Faker::firstNameMale(), |
|
| 32 | + 'type' => 0 |
|
| 33 | 33 | ]); |
@@ -27,10 +27,10 @@ |
||
| 27 | 27 | * General factory for the comment model. |
| 28 | 28 | */ |
| 29 | 29 | $fm->define('OCA\Polls\Db\Comment')->setDefinitions([ |
| 30 | - 'userId' => Faker::firstNameMale(), |
|
| 31 | - 'dt' => function () { |
|
| 32 | - $date = new DateTime('today'); |
|
| 33 | - return $date->format('Y-m-d H:i:s'); |
|
| 34 | - }, |
|
| 35 | - 'comment' => Faker::text(255) |
|
| 30 | + 'userId' => Faker::firstNameMale(), |
|
| 31 | + 'dt' => function () { |
|
| 32 | + $date = new DateTime('today'); |
|
| 33 | + return $date->format('Y-m-d H:i:s'); |
|
| 34 | + }, |
|
| 35 | + 'comment' => Faker::text(255) |
|
| 36 | 36 | ]); |
@@ -27,20 +27,20 @@ |
||
| 27 | 27 | * General factory for the event model. |
| 28 | 28 | */ |
| 29 | 29 | $fm->define('OCA\Polls\Db\Event')->setDefinitions([ |
| 30 | - 'type' => 0, |
|
| 31 | - 'title' => Faker::sentence(10), |
|
| 32 | - 'description' => Faker::text(255), |
|
| 33 | - 'owner' => Faker::firstNameMale(), |
|
| 34 | - 'created' => function () { |
|
| 35 | - $date = new DateTime('today'); |
|
| 36 | - return $date->format('Y-m-d H:i:s'); |
|
| 37 | - }, |
|
| 38 | - 'access' => 'registered', |
|
| 39 | - 'expire' => function () { |
|
| 40 | - $date = new DateTime('tomorrow'); |
|
| 41 | - return $date->format('Y-m-d H:i:s'); |
|
| 42 | - }, |
|
| 43 | - 'hash' => Faker::regexify('[A-Za-z0-9]{16}'), |
|
| 44 | - 'isAnonymous' => 0, |
|
| 45 | - 'fullAnonymous' => 0 |
|
| 30 | + 'type' => 0, |
|
| 31 | + 'title' => Faker::sentence(10), |
|
| 32 | + 'description' => Faker::text(255), |
|
| 33 | + 'owner' => Faker::firstNameMale(), |
|
| 34 | + 'created' => function () { |
|
| 35 | + $date = new DateTime('today'); |
|
| 36 | + return $date->format('Y-m-d H:i:s'); |
|
| 37 | + }, |
|
| 38 | + 'access' => 'registered', |
|
| 39 | + 'expire' => function () { |
|
| 40 | + $date = new DateTime('tomorrow'); |
|
| 41 | + return $date->format('Y-m-d H:i:s'); |
|
| 42 | + }, |
|
| 43 | + 'hash' => Faker::regexify('[A-Za-z0-9]{16}'), |
|
| 44 | + 'isAnonymous' => 0, |
|
| 45 | + 'fullAnonymous' => 0 |
|
| 46 | 46 | ]); |
@@ -31,12 +31,12 @@ |
||
| 31 | 31 | 'title' => Faker::sentence(10), |
| 32 | 32 | 'description' => Faker::text(255), |
| 33 | 33 | 'owner' => Faker::firstNameMale(), |
| 34 | - 'created' => function () { |
|
| 34 | + 'created' => function() { |
|
| 35 | 35 | $date = new DateTime('today'); |
| 36 | 36 | return $date->format('Y-m-d H:i:s'); |
| 37 | 37 | }, |
| 38 | 38 | 'access' => 'registered', |
| 39 | - 'expire' => function () { |
|
| 39 | + 'expire' => function() { |
|
| 40 | 40 | $date = new DateTime('tomorrow'); |
| 41 | 41 | return $date->format('Y-m-d H:i:s'); |
| 42 | 42 | }, |
@@ -33,181 +33,181 @@ |
||
| 33 | 33 | */ |
| 34 | 34 | class Version009000Date20171202105141 extends SimpleMigrationStep { |
| 35 | 35 | |
| 36 | - /** |
|
| 37 | - * @param IOutput $output |
|
| 38 | - * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
| 39 | - * @param array $options |
|
| 40 | - * @return null|ISchemaWrapper |
|
| 41 | - * @since 13.0.0 |
|
| 42 | - */ |
|
| 43 | - public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
| 44 | - /** @var ISchemaWrapper $schema */ |
|
| 45 | - $schema = $schemaClosure(); |
|
| 36 | + /** |
|
| 37 | + * @param IOutput $output |
|
| 38 | + * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
| 39 | + * @param array $options |
|
| 40 | + * @return null|ISchemaWrapper |
|
| 41 | + * @since 13.0.0 |
|
| 42 | + */ |
|
| 43 | + public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) { |
|
| 44 | + /** @var ISchemaWrapper $schema */ |
|
| 45 | + $schema = $schemaClosure(); |
|
| 46 | 46 | |
| 47 | - if (!$schema->hasTable('polls_events')) { |
|
| 48 | - $table = $schema->createTable('polls_events'); |
|
| 49 | - $table->addColumn('id', Type::INTEGER, [ |
|
| 50 | - 'autoincrement' => true, |
|
| 51 | - 'notnull' => true, |
|
| 52 | - ]); |
|
| 53 | - $table->addColumn('hash', Type::STRING, [ |
|
| 54 | - 'notnull' => false, |
|
| 55 | - 'length' => 64, |
|
| 56 | - ]); |
|
| 57 | - $table->addColumn('type', Type::BIGINT, [ |
|
| 58 | - 'notnull' => false, |
|
| 59 | - 'length' => 16, |
|
| 60 | - ]); |
|
| 61 | - $table->addColumn('title', Type::STRING, [ |
|
| 62 | - 'notnull' => true, |
|
| 63 | - 'length' => 128, |
|
| 64 | - ]); |
|
| 65 | - $table->addColumn('description', Type::STRING, [ |
|
| 66 | - 'notnull' => true, |
|
| 67 | - 'length' => 1024, |
|
| 68 | - ]); |
|
| 69 | - $table->addColumn('owner', Type::STRING, [ |
|
| 70 | - 'notnull' => true, |
|
| 71 | - 'length' => 64, |
|
| 72 | - ]); |
|
| 73 | - $table->addColumn('created', Type::DATETIME, [ |
|
| 74 | - 'notnull' => false, |
|
| 75 | - ]); |
|
| 76 | - $table->addColumn('access', Type::STRING, [ |
|
| 77 | - 'notnull' => false, |
|
| 78 | - 'length' => 1024, |
|
| 79 | - ]); |
|
| 80 | - $table->addColumn('expire', Type::DATETIME, [ |
|
| 81 | - 'notnull' => false, |
|
| 82 | - ]); |
|
| 83 | - $table->addColumn('is_anonymous', Type::INTEGER, [ |
|
| 84 | - 'notnull' => false, |
|
| 85 | - 'default' => 0, |
|
| 86 | - ]); |
|
| 87 | - $table->addColumn('full_anonymous', Type::INTEGER, [ |
|
| 88 | - 'notnull' => false, |
|
| 89 | - 'default' => 0, |
|
| 90 | - ]); |
|
| 91 | - $table->setPrimaryKey(['id']); |
|
| 92 | - } |
|
| 47 | + if (!$schema->hasTable('polls_events')) { |
|
| 48 | + $table = $schema->createTable('polls_events'); |
|
| 49 | + $table->addColumn('id', Type::INTEGER, [ |
|
| 50 | + 'autoincrement' => true, |
|
| 51 | + 'notnull' => true, |
|
| 52 | + ]); |
|
| 53 | + $table->addColumn('hash', Type::STRING, [ |
|
| 54 | + 'notnull' => false, |
|
| 55 | + 'length' => 64, |
|
| 56 | + ]); |
|
| 57 | + $table->addColumn('type', Type::BIGINT, [ |
|
| 58 | + 'notnull' => false, |
|
| 59 | + 'length' => 16, |
|
| 60 | + ]); |
|
| 61 | + $table->addColumn('title', Type::STRING, [ |
|
| 62 | + 'notnull' => true, |
|
| 63 | + 'length' => 128, |
|
| 64 | + ]); |
|
| 65 | + $table->addColumn('description', Type::STRING, [ |
|
| 66 | + 'notnull' => true, |
|
| 67 | + 'length' => 1024, |
|
| 68 | + ]); |
|
| 69 | + $table->addColumn('owner', Type::STRING, [ |
|
| 70 | + 'notnull' => true, |
|
| 71 | + 'length' => 64, |
|
| 72 | + ]); |
|
| 73 | + $table->addColumn('created', Type::DATETIME, [ |
|
| 74 | + 'notnull' => false, |
|
| 75 | + ]); |
|
| 76 | + $table->addColumn('access', Type::STRING, [ |
|
| 77 | + 'notnull' => false, |
|
| 78 | + 'length' => 1024, |
|
| 79 | + ]); |
|
| 80 | + $table->addColumn('expire', Type::DATETIME, [ |
|
| 81 | + 'notnull' => false, |
|
| 82 | + ]); |
|
| 83 | + $table->addColumn('is_anonymous', Type::INTEGER, [ |
|
| 84 | + 'notnull' => false, |
|
| 85 | + 'default' => 0, |
|
| 86 | + ]); |
|
| 87 | + $table->addColumn('full_anonymous', Type::INTEGER, [ |
|
| 88 | + 'notnull' => false, |
|
| 89 | + 'default' => 0, |
|
| 90 | + ]); |
|
| 91 | + $table->setPrimaryKey(['id']); |
|
| 92 | + } |
|
| 93 | 93 | |
| 94 | - if (!$schema->hasTable('polls_dts')) { |
|
| 95 | - $table = $schema->createTable('polls_dts'); |
|
| 96 | - $table->addColumn('id', Type::INTEGER, [ |
|
| 97 | - 'autoincrement' => true, |
|
| 98 | - 'notnull' => true, |
|
| 99 | - ]); |
|
| 100 | - $table->addColumn('poll_id', Type::INTEGER, [ |
|
| 101 | - 'notnull' => false, |
|
| 102 | - ]); |
|
| 103 | - $table->addColumn('dt', Type::DATETIME, [ |
|
| 104 | - 'notnull' => false, |
|
| 105 | - 'length' => 32, |
|
| 106 | - ]); |
|
| 107 | - $table->setPrimaryKey(['id']); |
|
| 108 | - } |
|
| 94 | + if (!$schema->hasTable('polls_dts')) { |
|
| 95 | + $table = $schema->createTable('polls_dts'); |
|
| 96 | + $table->addColumn('id', Type::INTEGER, [ |
|
| 97 | + 'autoincrement' => true, |
|
| 98 | + 'notnull' => true, |
|
| 99 | + ]); |
|
| 100 | + $table->addColumn('poll_id', Type::INTEGER, [ |
|
| 101 | + 'notnull' => false, |
|
| 102 | + ]); |
|
| 103 | + $table->addColumn('dt', Type::DATETIME, [ |
|
| 104 | + 'notnull' => false, |
|
| 105 | + 'length' => 32, |
|
| 106 | + ]); |
|
| 107 | + $table->setPrimaryKey(['id']); |
|
| 108 | + } |
|
| 109 | 109 | |
| 110 | - if (!$schema->hasTable('polls_txts')) { |
|
| 111 | - $table = $schema->createTable('polls_txts'); |
|
| 112 | - $table->addColumn('id', Type::INTEGER, [ |
|
| 113 | - 'autoincrement' => true, |
|
| 114 | - 'notnull' => true, |
|
| 115 | - ]); |
|
| 116 | - $table->addColumn('poll_id', Type::INTEGER, [ |
|
| 117 | - 'notnull' => false, |
|
| 118 | - ]); |
|
| 119 | - $table->addColumn('text', Type::STRING, [ |
|
| 120 | - 'notnull' => false, |
|
| 121 | - 'length' => 256, |
|
| 122 | - ]); |
|
| 123 | - $table->setPrimaryKey(['id']); |
|
| 124 | - } |
|
| 110 | + if (!$schema->hasTable('polls_txts')) { |
|
| 111 | + $table = $schema->createTable('polls_txts'); |
|
| 112 | + $table->addColumn('id', Type::INTEGER, [ |
|
| 113 | + 'autoincrement' => true, |
|
| 114 | + 'notnull' => true, |
|
| 115 | + ]); |
|
| 116 | + $table->addColumn('poll_id', Type::INTEGER, [ |
|
| 117 | + 'notnull' => false, |
|
| 118 | + ]); |
|
| 119 | + $table->addColumn('text', Type::STRING, [ |
|
| 120 | + 'notnull' => false, |
|
| 121 | + 'length' => 256, |
|
| 122 | + ]); |
|
| 123 | + $table->setPrimaryKey(['id']); |
|
| 124 | + } |
|
| 125 | 125 | |
| 126 | - if (!$schema->hasTable('polls_particip')) { |
|
| 127 | - $table = $schema->createTable('polls_particip'); |
|
| 128 | - $table->addColumn('id', Type::INTEGER, [ |
|
| 129 | - 'autoincrement' => true, |
|
| 130 | - 'notnull' => true, |
|
| 131 | - ]); |
|
| 132 | - $table->addColumn('poll_id', Type::INTEGER, [ |
|
| 133 | - 'notnull' => false, |
|
| 134 | - ]); |
|
| 135 | - $table->addColumn('dt', Type::DATETIME, [ |
|
| 136 | - 'notnull' => false, |
|
| 137 | - ]); |
|
| 138 | - $table->addColumn('type', Type::INTEGER, [ |
|
| 139 | - 'notnull' => false, |
|
| 140 | - ]); |
|
| 141 | - $table->addColumn('user_id', Type::STRING, [ |
|
| 142 | - 'notnull' => true, |
|
| 143 | - 'length' => 64, |
|
| 144 | - ]); |
|
| 145 | - $table->setPrimaryKey(['id']); |
|
| 146 | - } |
|
| 126 | + if (!$schema->hasTable('polls_particip')) { |
|
| 127 | + $table = $schema->createTable('polls_particip'); |
|
| 128 | + $table->addColumn('id', Type::INTEGER, [ |
|
| 129 | + 'autoincrement' => true, |
|
| 130 | + 'notnull' => true, |
|
| 131 | + ]); |
|
| 132 | + $table->addColumn('poll_id', Type::INTEGER, [ |
|
| 133 | + 'notnull' => false, |
|
| 134 | + ]); |
|
| 135 | + $table->addColumn('dt', Type::DATETIME, [ |
|
| 136 | + 'notnull' => false, |
|
| 137 | + ]); |
|
| 138 | + $table->addColumn('type', Type::INTEGER, [ |
|
| 139 | + 'notnull' => false, |
|
| 140 | + ]); |
|
| 141 | + $table->addColumn('user_id', Type::STRING, [ |
|
| 142 | + 'notnull' => true, |
|
| 143 | + 'length' => 64, |
|
| 144 | + ]); |
|
| 145 | + $table->setPrimaryKey(['id']); |
|
| 146 | + } |
|
| 147 | 147 | |
| 148 | - if (!$schema->hasTable('polls_particip_text')) { |
|
| 149 | - $table = $schema->createTable('polls_particip_text'); |
|
| 150 | - $table->addColumn('id', Type::INTEGER, [ |
|
| 151 | - 'autoincrement' => true, |
|
| 152 | - 'notnull' => true, |
|
| 153 | - ]); |
|
| 154 | - $table->addColumn('poll_id', Type::INTEGER, [ |
|
| 155 | - 'notnull' => false, |
|
| 156 | - ]); |
|
| 157 | - $table->addColumn('text', Type::STRING, [ |
|
| 158 | - 'notnull' => false, |
|
| 159 | - 'length' => 256, |
|
| 160 | - ]); |
|
| 161 | - $table->addColumn('user_id', Type::STRING, [ |
|
| 162 | - 'notnull' => true, |
|
| 163 | - 'length' => 64, |
|
| 164 | - ]); |
|
| 165 | - $table->addColumn('type', Type::INTEGER, [ |
|
| 166 | - 'notnull' => false, |
|
| 167 | - ]); |
|
| 168 | - $table->setPrimaryKey(['id']); |
|
| 169 | - } |
|
| 148 | + if (!$schema->hasTable('polls_particip_text')) { |
|
| 149 | + $table = $schema->createTable('polls_particip_text'); |
|
| 150 | + $table->addColumn('id', Type::INTEGER, [ |
|
| 151 | + 'autoincrement' => true, |
|
| 152 | + 'notnull' => true, |
|
| 153 | + ]); |
|
| 154 | + $table->addColumn('poll_id', Type::INTEGER, [ |
|
| 155 | + 'notnull' => false, |
|
| 156 | + ]); |
|
| 157 | + $table->addColumn('text', Type::STRING, [ |
|
| 158 | + 'notnull' => false, |
|
| 159 | + 'length' => 256, |
|
| 160 | + ]); |
|
| 161 | + $table->addColumn('user_id', Type::STRING, [ |
|
| 162 | + 'notnull' => true, |
|
| 163 | + 'length' => 64, |
|
| 164 | + ]); |
|
| 165 | + $table->addColumn('type', Type::INTEGER, [ |
|
| 166 | + 'notnull' => false, |
|
| 167 | + ]); |
|
| 168 | + $table->setPrimaryKey(['id']); |
|
| 169 | + } |
|
| 170 | 170 | |
| 171 | - if (!$schema->hasTable('polls_comments')) { |
|
| 172 | - $table = $schema->createTable('polls_comments'); |
|
| 173 | - $table->addColumn('id', Type::INTEGER, [ |
|
| 174 | - 'autoincrement' => true, |
|
| 175 | - 'notnull' => true, |
|
| 176 | - ]); |
|
| 177 | - $table->addColumn('poll_id', Type::INTEGER, [ |
|
| 178 | - 'notnull' => false, |
|
| 179 | - ]); |
|
| 180 | - $table->addColumn('user_id', Type::STRING, [ |
|
| 181 | - 'notnull' => true, |
|
| 182 | - 'length' => 64, |
|
| 183 | - ]); |
|
| 184 | - $table->addColumn('dt', Type::STRING, [ |
|
| 185 | - 'notnull' => true, |
|
| 186 | - 'length' => 32, |
|
| 187 | - ]); |
|
| 188 | - $table->addColumn('comment', Type::STRING, [ |
|
| 189 | - 'notnull' => false, |
|
| 190 | - 'length' => 1024, |
|
| 191 | - ]); |
|
| 192 | - $table->setPrimaryKey(['id']); |
|
| 193 | - } |
|
| 171 | + if (!$schema->hasTable('polls_comments')) { |
|
| 172 | + $table = $schema->createTable('polls_comments'); |
|
| 173 | + $table->addColumn('id', Type::INTEGER, [ |
|
| 174 | + 'autoincrement' => true, |
|
| 175 | + 'notnull' => true, |
|
| 176 | + ]); |
|
| 177 | + $table->addColumn('poll_id', Type::INTEGER, [ |
|
| 178 | + 'notnull' => false, |
|
| 179 | + ]); |
|
| 180 | + $table->addColumn('user_id', Type::STRING, [ |
|
| 181 | + 'notnull' => true, |
|
| 182 | + 'length' => 64, |
|
| 183 | + ]); |
|
| 184 | + $table->addColumn('dt', Type::STRING, [ |
|
| 185 | + 'notnull' => true, |
|
| 186 | + 'length' => 32, |
|
| 187 | + ]); |
|
| 188 | + $table->addColumn('comment', Type::STRING, [ |
|
| 189 | + 'notnull' => false, |
|
| 190 | + 'length' => 1024, |
|
| 191 | + ]); |
|
| 192 | + $table->setPrimaryKey(['id']); |
|
| 193 | + } |
|
| 194 | 194 | |
| 195 | - if (!$schema->hasTable('polls_notif')) { |
|
| 196 | - $table = $schema->createTable('polls_notif'); |
|
| 197 | - $table->addColumn('id', Type::INTEGER, [ |
|
| 198 | - 'autoincrement' => true, |
|
| 199 | - 'notnull' => true, |
|
| 200 | - ]); |
|
| 201 | - $table->addColumn('poll_id', Type::INTEGER, [ |
|
| 202 | - 'notnull' => false, |
|
| 203 | - ]); |
|
| 204 | - $table->addColumn('user_id', Type::STRING, [ |
|
| 205 | - 'notnull' => true, |
|
| 206 | - 'length' => 64, |
|
| 207 | - ]); |
|
| 208 | - $table->setPrimaryKey(['id']); |
|
| 209 | - } |
|
| 210 | - return $schema; |
|
| 211 | - } |
|
| 195 | + if (!$schema->hasTable('polls_notif')) { |
|
| 196 | + $table = $schema->createTable('polls_notif'); |
|
| 197 | + $table->addColumn('id', Type::INTEGER, [ |
|
| 198 | + 'autoincrement' => true, |
|
| 199 | + 'notnull' => true, |
|
| 200 | + ]); |
|
| 201 | + $table->addColumn('poll_id', Type::INTEGER, [ |
|
| 202 | + 'notnull' => false, |
|
| 203 | + ]); |
|
| 204 | + $table->addColumn('user_id', Type::STRING, [ |
|
| 205 | + 'notnull' => true, |
|
| 206 | + 'length' => 64, |
|
| 207 | + ]); |
|
| 208 | + $table->setPrimaryKey(['id']); |
|
| 209 | + } |
|
| 210 | + return $schema; |
|
| 211 | + } |
|
| 212 | 212 | |
| 213 | 213 | } |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | 'notnull' => false, |
| 89 | 89 | 'default' => 0, |
| 90 | 90 | ]); |
| 91 | - $table->setPrimaryKey(['id']); |
|
| 91 | + $table->setPrimaryKey([ 'id' ]); |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | if (!$schema->hasTable('polls_dts')) { |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | 'notnull' => false, |
| 105 | 105 | 'length' => 32, |
| 106 | 106 | ]); |
| 107 | - $table->setPrimaryKey(['id']); |
|
| 107 | + $table->setPrimaryKey([ 'id' ]); |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | if (!$schema->hasTable('polls_txts')) { |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | 'notnull' => false, |
| 121 | 121 | 'length' => 256, |
| 122 | 122 | ]); |
| 123 | - $table->setPrimaryKey(['id']); |
|
| 123 | + $table->setPrimaryKey([ 'id' ]); |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | if (!$schema->hasTable('polls_particip')) { |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | 'notnull' => true, |
| 143 | 143 | 'length' => 64, |
| 144 | 144 | ]); |
| 145 | - $table->setPrimaryKey(['id']); |
|
| 145 | + $table->setPrimaryKey([ 'id' ]); |
|
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | if (!$schema->hasTable('polls_particip_text')) { |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | $table->addColumn('type', Type::INTEGER, [ |
| 166 | 166 | 'notnull' => false, |
| 167 | 167 | ]); |
| 168 | - $table->setPrimaryKey(['id']); |
|
| 168 | + $table->setPrimaryKey([ 'id' ]); |
|
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | if (!$schema->hasTable('polls_comments')) { |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | 'notnull' => false, |
| 190 | 190 | 'length' => 1024, |
| 191 | 191 | ]); |
| 192 | - $table->setPrimaryKey(['id']); |
|
| 192 | + $table->setPrimaryKey([ 'id' ]); |
|
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | if (!$schema->hasTable('polls_notif')) { |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | 'notnull' => true, |
| 206 | 206 | 'length' => 64, |
| 207 | 207 | ]); |
| 208 | - $table->setPrimaryKey(['id']); |
|
| 208 | + $table->setPrimaryKey([ 'id' ]); |
|
| 209 | 209 | } |
| 210 | 210 | return $schema; |
| 211 | 211 | } |