getEnvironment() == "thetool") { $this->table('RaspberryDisplay')->drop()->save(); $this->table('RaspberryDisplay') ->addColumn('display_label', 'string', ['limit' => 255, 'null' => false]) ->addColumn('hostname', 'string', ['limit' => 255, 'null' => true]) ->addColumn('ip_address', 'string', ['limit' => 45, 'null' => false]) ->addColumn('display_url', 'text', ['null' => true]) ->addColumn('group_name', 'string', ['limit' => 100, 'null' => false]) ->addColumn('group_order', 'integer', ['default' => 0]) ->addColumn('monitor_size', 'enum', ['values' => ['27', '42', '55', '65'], 'default' => '27']) ->addColumn('hdmi_port', 'integer', ['limit' => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY, 'default' => 0]) ->addColumn('agent_port', 'integer', ['default' => 5000]) ->addColumn('custom_style', 'text', ['null' => true]) ->addColumn('create', 'integer', ['null' => true]) ->addColumn('edit', 'integer', ['null' => true]) ->addColumn('create_by', 'integer', ['null' => true]) ->addColumn('edit_by', 'integer', ['null' => true]) ->addIndex(['group_name']) ->addIndex(['ip_address']) ->create(); } if($this->getEnvironment() == "addressdb") { } } public function down(): void { if($this->getEnvironment() == "thetool") { $this->table('RaspberryDisplay')->drop()->save(); $this->table('RaspberryDisplay') ->addColumn('display_label', 'string', ['limit' => 255]) ->addColumn('hostname', 'string', ['limit' => 255]) ->addColumn('ip_address', 'string', ['limit' => 15]) ->addColumn('display_url', 'string', ['limit' => 255]) ->addColumn('auto_refresh_enabled', 'boolean', ['default' => false]) ->addColumn('margin_hot_fix_enabled', 'boolean', ['default' => false]) ->addColumn('custom_style', 'string', ['limit' => 255, 'null' => true]) ->addColumn('create', 'integer', ['null' => true]) ->addColumn('edit', 'integer', ['null' => true]) ->addColumn('create_by', 'integer', ['null' => true]) ->addColumn('edit_by', 'integer', ['null' => true]) ->create(); } if($this->getEnvironment() == "addressdb") { } } }