20230125213600_add_pre_test_fields_to_project_table.php 636 B

1234567891011121314
  1. <?php
  2. use Phinx\Db\Adapter\MysqlAdapter;
  3. use Phinx\Migration\AbstractMigration;
  4. class AddPreTestFieldsToProjectTable extends AbstractMigration {
  5. public function change() {
  6. $this->table("project")
  7. ->addColumn("browse_time", "integer", ["signed" => false, "null" => true, "limit" => MysqlAdapter::INT_TINY, "after" => "tester_can_claim"])
  8. ->addColumn("play_money", "decimal", ["signed" => false, "null" => true, "precision" => 5, "scale" => 2, "after" => "browse_time"])
  9. ->addColumn("play_time", "integer", ["signed" => false, "null" => true, "limit" => MysqlAdapter::INT_TINY, "after" => "play_money"])
  10. ->update();
  11. }
  12. }