Archived
1
0
Fork 0
This repository has been archived on 2026-04-03. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
httpcb/app/migrations/20180321115827_create_user_table.php

34 lines
736 B
PHP

<?php
use Phinx\Migration\AbstractMigration;
class CreateUserTable extends AbstractMigration
{
public function up()
{
$table = $this->table('user');
$table->addColumn('username', 'string', [
'limit' => 50,
'null' => false
]);
$table->addColumn('email', 'string', [
'limit' => 255,
'null' => false
]);
$table->addColumn('status', 'enum', [
'null' => false,
'default' => 'Active',
'values' => [ 'Active', 'Deleted', 'Suspended']
]);
$table->addColumn('password', 'string', [
'limit' => 255,
'null' => true,
]);
$table->save();
}
}