@@ -7,17 +7,17 @@ |
||
7 | 7 | { |
8 | 8 | public function safeUp() |
9 | 9 | { |
10 | - $this->createTable(UserInvite::tableName(), [ |
|
11 | - 'token'=>'varchar(255) CHARACTER SET latin1 COLLATE latin1_general_cs PRIMARY KEY COMMENT "The token"', |
|
12 | - 'user_id'=> $this->uuid64( 'foreign key of the user who owns this token')->notNull(), |
|
13 | - // timestamps |
|
14 | - 'expires_at' => $this->dateTime(), |
|
15 | - 'created_at' => $this->createdAt(), |
|
16 | - 'updated_at' => $this->updatedAt(), |
|
17 | - // blames |
|
18 | - 'created_by' => $this->createdBy(), |
|
19 | - 'updated_by' => $this->updatedBy() |
|
20 | - ]); |
|
10 | + $this->createTable(UserInvite::tableName(), [ |
|
11 | + 'token'=>'varchar(255) CHARACTER SET latin1 COLLATE latin1_general_cs PRIMARY KEY COMMENT "The token"', |
|
12 | + 'user_id'=> $this->uuid64( 'foreign key of the user who owns this token')->notNull(), |
|
13 | + // timestamps |
|
14 | + 'expires_at' => $this->dateTime(), |
|
15 | + 'created_at' => $this->createdAt(), |
|
16 | + 'updated_at' => $this->updatedAt(), |
|
17 | + // blames |
|
18 | + 'created_by' => $this->createdBy(), |
|
19 | + 'updated_by' => $this->updatedBy() |
|
20 | + ]); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | public function safeDown() |
@@ -25,7 +25,7 @@ |
||
25 | 25 | public function safeDown() |
26 | 26 | { |
27 | 27 | $auth = neon()->authManager; |
28 | - $auth->removeAll(); |
|
28 | + $auth->removeAll(); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | } |
32 | 32 | \ No newline at end of file |
@@ -5,23 +5,23 @@ |
||
5 | 5 | class m161211_160816_user_correct_current_field extends Migration |
6 | 6 | { |
7 | 7 | |
8 | - public function safeUp() |
|
9 | - { |
|
8 | + public function safeUp() |
|
9 | + { |
|
10 | 10 | /** |
11 | 11 | * fix an incorrect definition of current in the code and make the name more meaningful |
12 | 12 | */ |
13 | 13 | $table = \neon\user\models\Session::tableName(); |
14 | 14 | $this->dropColumn($table, 'current'); |
15 | 15 | $this->addColumn($table, 'current_url', $this->string(1000)->comment('The current url the user requested in this session')); |
16 | - } |
|
16 | + } |
|
17 | 17 | |
18 | - public function safeDown() |
|
19 | - { |
|
18 | + public function safeDown() |
|
19 | + { |
|
20 | 20 | /** |
21 | 21 | * revert back to the broken definition |
22 | 22 | */ |
23 | 23 | $table = \neon\user\models\Session::tableName(); |
24 | 24 | $this->dropColumn($table, 'current_url'); |
25 | 25 | $this->addColumn($table, 'current', $this->dateTime()->comment('The current url the user requested in this session')); |
26 | - } |
|
26 | + } |
|
27 | 27 | } |
@@ -5,17 +5,17 @@ |
||
5 | 5 | class m170104_161200_use_baseclass_timestamps extends Migration |
6 | 6 | { |
7 | 7 | |
8 | - public function safeUp() |
|
9 | - { |
|
8 | + public function safeUp() |
|
9 | + { |
|
10 | 10 | $table = \neon\user\models\User::tableName(); |
11 | 11 | $this->renameColumn($table, 'created_on', 'created_at'); |
12 | 12 | $this->renameColumn($table, 'updated_on', 'updated_at'); |
13 | - } |
|
13 | + } |
|
14 | 14 | |
15 | - public function safeDown() |
|
16 | - { |
|
15 | + public function safeDown() |
|
16 | + { |
|
17 | 17 | $table = \neon\user\models\User::tableName(); |
18 | 18 | $this->renameColumn($table, 'created_at', 'created_on'); |
19 | 19 | $this->renameColumn($table, 'updated_at', 'updated_on'); |
20 | - } |
|
20 | + } |
|
21 | 21 | } |
@@ -335,7 +335,7 @@ |
||
335 | 335 | * Check the system requirements |
336 | 336 | * Returns an array of tests that detect if the system meats the requirements for Neon |
337 | 337 | * |
338 | - * @return array of requirement tests: |
|
338 | + * @return array of requirement tests: |
|
339 | 339 | * for e.g: |
340 | 340 | * |
341 | 341 | * ```php |
@@ -46,7 +46,7 @@ |
||
46 | 46 | */ |
47 | 47 | public function actionMigrations() |
48 | 48 | { |
49 | - ob_start(); |
|
49 | + ob_start(); |
|
50 | 50 | $migrator = new \neon\core\db\Migrator(); |
51 | 51 | $migrator->runAllMigrations(); |
52 | 52 | $migrations = ob_get_clean(); |
@@ -301,10 +301,10 @@ |
||
301 | 301 | public function commitRequests(); |
302 | 302 | |
303 | 303 | /** |
304 | - * Extract data from the last committed requests |
|
305 | - * @param string $requestKey the request key you want to extract for |
|
306 | - * @return array the requested data or [] if none |
|
307 | - */ |
|
304 | + * Extract data from the last committed requests |
|
305 | + * @param string $requestKey the request key you want to extract for |
|
306 | + * @return array the requested data or [] if none |
|
307 | + */ |
|
308 | 308 | public function getLastCommitData($requestKey); |
309 | 309 | |
310 | 310 |
@@ -9,8 +9,8 @@ discard block |
||
9 | 9 | */ |
10 | 10 | class m170724_112209_dds_link_table_creation extends Migration |
11 | 11 | { |
12 | - public function safeUp() |
|
13 | - { |
|
12 | + public function safeUp() |
|
13 | + { |
|
14 | 14 | // create a linking table for links |
15 | 15 | $tableOptions = null; |
16 | 16 | if ($this->db->driverName === 'mysql') { |
@@ -40,8 +40,8 @@ discard block |
||
40 | 40 | |
41 | 41 | } |
42 | 42 | |
43 | - public function safeDown() |
|
44 | - { |
|
43 | + public function safeDown() |
|
44 | + { |
|
45 | 45 | $this->dropTable('dds_link'); |
46 | 46 | $connection = neon()->db; |
47 | 47 | $sql =<<<EOQ |
@@ -52,5 +52,5 @@ discard block |
||
52 | 52 | $this->execute($sql); |
53 | 53 | $this->dropColumn('dds_member', 'link_class'); |
54 | 54 | |
55 | - } |
|
55 | + } |
|
56 | 56 | } |
@@ -5,14 +5,14 @@ |
||
5 | 5 | class m161201_170340_dds_add_map_field_to_members extends Migration |
6 | 6 | { |
7 | 7 | |
8 | - public function safeUp() |
|
9 | - { |
|
8 | + public function safeUp() |
|
9 | + { |
|
10 | 10 | $this->addColumn('dds_member', 'map_field', "TINYINT(1) NOT NULL DEFAULT 0 COMMENT 'If true, then this is field data used in defining maps' AFTER `definition`"); |
11 | - } |
|
11 | + } |
|
12 | 12 | |
13 | - public function safeDown() |
|
14 | - { |
|
13 | + public function safeDown() |
|
14 | + { |
|
15 | 15 | $this->dropColumn('dds_member', 'map_field'); |
16 | - } |
|
16 | + } |
|
17 | 17 | |
18 | 18 | } |