← All changes
|
src/config/migrations/20191011111109_WpYoastIndexableHierarchy.php
+7
-3
18.2
→
trunk
View file →
| @@ -18,8 +18,10 @@ | ||
| 18 | 18 | public static $plugin = 'free'; |
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * Migration up. |
| 22 | + * | |
| 23 | + * @return void | |
| 22 | 24 | */ |
| 23 | 25 | public function up() { |
| 24 | 26 | $table_name = $this->get_table_name(); |
| 25 | 27 | |
| @@ -32,9 +34,9 @@ | ||
| 32 | 34 | 'primary_key' => true, |
| 33 | 35 | 'unsigned' => true, |
| 34 | 36 | 'null' => true, |
| 35 | 37 | 'limit' => 11, |
| 36 | - ] | |
| 38 | + ], | |
| 37 | 39 | ); |
| 38 | 40 | $indexable_table->column( |
| 39 | 41 | 'ancestor_id', |
| 40 | 42 | 'integer', |
| @@ -42,9 +44,9 @@ | ||
| 42 | 44 | 'primary_key' => true, |
| 43 | 45 | 'unsigned' => true, |
| 44 | 46 | 'null' => true, |
| 45 | 47 | 'limit' => 11, |
| 46 | - ] | |
| 48 | + ], | |
| 47 | 49 | ); |
| 48 | 50 | $indexable_table->column( |
| 49 | 51 | 'depth', |
| 50 | 52 | 'integer', |
| @@ -51,9 +53,9 @@ | ||
| 51 | 53 | [ |
| 52 | 54 | 'unsigned' => true, |
| 53 | 55 | 'null' => true, |
| 54 | 56 | 'limit' => 11, |
| 55 | - ] | |
| 57 | + ], | |
| 56 | 58 | ); |
| 57 | 59 | $indexable_table->finish(); |
| 58 | 60 | |
| 59 | 61 | $this->add_index( $table_name, 'indexable_id', [ 'name' => 'indexable_id' ] ); |
| @@ -62,8 +64,10 @@ | ||
| 62 | 64 | } |
| 63 | 65 | |
| 64 | 66 | /** |
| 65 | 67 | * Migration up. |
| 68 | + * | |
| 69 | + * @return void | |
| 66 | 70 | */ |
| 67 | 71 | public function down() { |
| 68 | 72 | $this->drop_table( $this->get_table_name() ); |
| 69 | 73 | } |