1
0
mirror of synced 2025-01-08 10:07:10 +03:00
doctrine2/sandbox/migrations/009_add_user.class.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');
}
}