mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-25 10:31:05 +00:00
test for migration
This commit is contained in:
parent
9a5c1bc62a
commit
8d6ff10e8e
2 changed files with 6 additions and 11 deletions
|
@ -3,18 +3,13 @@
|
|||
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;");
|
||||
$this->execute("INSERT INTO config (name, value) VALUES ('foo', 'bar');");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -22,6 +17,6 @@ class InitDatabase extends AbstractMigration
|
|||
*/
|
||||
public function down()
|
||||
{
|
||||
$this->execute("DROP DATABASE montest;");
|
||||
$this->execute("DELETE FROM config WHERE name = 'foo' AND value = 'bar';");
|
||||
}
|
||||
}
|
|
@ -6,12 +6,12 @@ environments:
|
|||
default_database: development
|
||||
production:
|
||||
adapter: sqlite
|
||||
name: db/poche
|
||||
name: app/db/poche
|
||||
|
||||
development:
|
||||
adapter: sqlite
|
||||
name: db/poche
|
||||
name: app/db/poche
|
||||
|
||||
testing:
|
||||
adapter: sqlite
|
||||
name: db/poche
|
||||
name: app/db/poche
|
||||
|
|
Loading…
Reference in a new issue