aboutsummaryrefslogtreecommitdiffhomepage
path: root/migrations/20150119171459_init_database.php
blob: 48a7d4b6aa5db858d64077070288039d6356f3b6 (plain) (blame)
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
<?php

use Phinx\Migration\AbstractMigration;

class InitDatabase extends AbstractMigration
{    
    /**
     * Migrate Up.
     */
    public function up()
    {
        $this->execute("CREATE TABLE IF NOT EXISTS `montest` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `value` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
    }

    /**
     * Migrate Down.
     */
    public function down()
    {
        $this->execute("DROP DATABASE montest;");
    }
}