blob: 4bf5a9df2e96008a096323aa5da9c01a71016739 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
<?php
class CreateSecurityQuestionsTable extends \Psecio\Gatekeeper\PhinxMigration
{
protected $tableName = 'security_questions';
/**
* Migrate Up.
*/
public function up()
{
$tokens = $this->table($this->getTableName());
$tokens->addColumn('question', 'string')
->addColumn('answer', 'string', array('limit' => 100))
->addColumn('user_id', 'integer')
->addColumn('created', 'datetime')
->addColumn('updated', 'datetime', array('default' => null))
->save();
}
/**
* Migrate Down.
*/
public function down()
{
$this->dropTable($this->getTableName());
}
}
|