profilers
3 years ago
rest-api
3 years ago
versions
3 years ago
migration-exception.php
3 years ago
migration-model.php
3 years ago
migrator.php
3 years ago
view-migrations.php
3 years ago
migration-model.php
38 lines
| 1 | <?php |
| 2 | |
| 3 | |
| 4 | namespace Jet_Form_Builder\Migrations; |
| 5 | |
| 6 | |
| 7 | use Jet_Form_Builder\Db_Queries\Base_Db_Model; |
| 8 | |
| 9 | class Migration_Model extends Base_Db_Model { |
| 10 | |
| 11 | /** |
| 12 | * @return string |
| 13 | */ |
| 14 | public static function table_name(): string { |
| 15 | return 'migrations'; |
| 16 | } |
| 17 | |
| 18 | /** |
| 19 | * @return array |
| 20 | */ |
| 21 | public static function schema(): array { |
| 22 | return array( |
| 23 | 'id' => 'bigint(20) NOT NULL AUTO_INCREMENT', |
| 24 | 'version' => 'varchar(255)', |
| 25 | 'executed_at' => 'TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP', |
| 26 | 'execution_time' => 'int(11)', |
| 27 | ); |
| 28 | } |
| 29 | |
| 30 | /** |
| 31 | * @return array |
| 32 | */ |
| 33 | public static function schema_keys(): array { |
| 34 | return array( |
| 35 | 'id' => 'primary key', |
| 36 | ); |
| 37 | } |
| 38 | } |