Skip to content

Commit

Permalink
add migration
Browse files Browse the repository at this point in the history
  • Loading branch information
enyeli committed Nov 21, 2016
1 parent 48413ca commit 94b4b0d
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions config/Migrations/001_TablesCreation.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php
use Phinx\Migration\AbstractMigration;

class TablesCreation extends AbstractMigration
{
public function change()
{
$this->table('metatags')
->addColumn('name', 'string', [
'limit' => 255,
'null' => false,
])
->addColumn('type', 'string', [
'limit' => 45,
'null' => true,
])
->create()
;

$this->table('metataggeds')
->addColumn('model', 'string', [
'limit' => 45,
'null' => false,
])
->addColumn('foreing_key', 'integer')
->addColumn('metatag_id', 'integer')
->addColumn('language', 'string', [
'limit' => 45,
'null' => false,
])
->addColumn('value', 'string')
->addColumn('created', 'datetime')
->addColumn('modified', 'datetime')
->create()
;
}
}

0 comments on commit 94b4b0d

Please sign in to comment.