60 lines
941 B
PHP
60 lines
941 B
PHP
<?php
|
|
/**
|
|
* This class has been auto-generated by the Doctrine ORM Framework
|
|
*/
|
|
class AddUser extends Doctrine_Migration
|
|
{
|
|
public function up()
|
|
{
|
|
$this->createTable('user', array (
|
|
'id' =>
|
|
array (
|
|
'primary' => true,
|
|
'autoincrement' => true,
|
|
'type' => 'integer',
|
|
'length' => 11,
|
|
),
|
|
'username' =>
|
|
array (
|
|
'type' => 'string',
|
|
'length' => 255,
|
|
),
|
|
'hair_color' =>
|
|
array (
|
|
'type' => 'string',
|
|
'length' => 255,
|
|
),
|
|
'contact_id' =>
|
|
array (
|
|
'type' => 'integer',
|
|
'length' => 11,
|
|
),
|
|
), array (
|
|
'indexes' =>
|
|
array (
|
|
'name_x' =>
|
|
array (
|
|
'fields' =>
|
|
array (
|
|
'username' =>
|
|
array (
|
|
'sorting' => 'ASC',
|
|
'length' => '11',
|
|
'primary' => true,
|
|
),
|
|
),
|
|
'type' => 'unique',
|
|
),
|
|
),
|
|
'primary' =>
|
|
array (
|
|
0 => 'id',
|
|
),
|
|
));
|
|
}
|
|
|
|
public function down()
|
|
{
|
|
$this->dropTable('user');
|
|
}
|
|
} |