CC-2867: separating Doctrine upgrade into 3 files
- done
This commit is contained in:
parent
5cc7de95ee
commit
b8c2c5dfb1
5 changed files with 61 additions and 34 deletions
29
install_minimal/DoctrineMigrations/Version20110925171256.php
Normal file
29
install_minimal/DoctrineMigrations/Version20110925171256.php
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration,
|
||||
Doctrine\DBAL\Schema\Schema;
|
||||
|
||||
class Version20110925171256 extends AbstractMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
// create cc_login_sttempts table
|
||||
$cc_login = $schema->createTable('cc_login_attempts');
|
||||
|
||||
$cc_login->addColumn('ip', 'string', array('length' => 32));
|
||||
$cc_login->addColumn('attempts', 'integer', array('notnull' => 0, 'default'=> 0));
|
||||
|
||||
$cc_login->setPrimaryKey(array('ip'));
|
||||
|
||||
// add login_attempts column to cc_subjs table
|
||||
$cc_subjs = $schema->getTable('cc_subjs');
|
||||
$cc_subjs->addColumn('login_attempts', 'integer', array('notnull' => 0, 'default'=> 0));
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue