Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class ResizeUserColumns extends Doctrine_Migration_Base
- {
- public function up()
- {
- $this->changeColumn('users', 'username', 'string', array(
- 'length' => 50,
- 'notnull' => true
- ));
- $this->changeColumn('users', 'firstname', 'string', array(
- 'length' => 32,
- 'notnull' => true
- ));
- $this->changeColumn('users', 'lastname', 'string', array(
- 'length' => 32,
- 'notnull' => true
- ));
- $this->changeColumn('users', 'pager', 'string', array(
- 'length' => 40,
- 'notnull' => true,
- 'default' => ''
- ));
- $this->changeColumn('users', 'pda', 'string', array(
- 'length' => 36,
- 'notnull' => true,
- 'default' => ''
- ));
- $this->changeColumn('users', 'externalkey', 'string', array(
- 'length' => 16,
- 'notnull' => true,
- 'default' => ''
- ));
- $this->removeColumn('users', 'old_password');
- }
- public function down()
- {
- $this->changeColumn('users', 'username', 'string', array(
- 'length' => 255,
- 'notnull' => true
- ));
- $this->changeColumn('users', 'firstname', 'string', array(
- 'length' => 255,
- 'notnull' => true
- ));
- $this->changeColumn('users', 'lastname', 'string', array(
- 'length' => 255,
- 'notnull' => true
- ));
- $this->changeColumn('users', 'pager', 'string', array(
- 'length' => 255,
- 'notnull' => true,
- 'default' => ''
- ));
- $this->changeColumn('users', 'pda', 'string', array(
- 'length' => 255,
- 'notnull' => true,
- 'default' => ''
- ));
- $this->changeColumn('users', 'externalkey', 'string', array(
- 'length' => 255,
- 'notnull' => true,
- 'default' => ''
- ));
- $this->addColumn('users', 'old_password', 'string', array(
- 'length' => 32
- ));
- }
- }
Add Comment
Please, Sign In to add comment