-
-
Notifications
You must be signed in to change notification settings - Fork 389
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<?php | ||
|
||
namespace Doctrine\DBAL\Migrations\Tests\Stub\Functional; | ||
|
||
use Doctrine\DBAL\Migrations\AbstractMigration; | ||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\DBAL\Types\Type; | ||
|
||
class MigrateAddSqlPostAndPreUpAndDownTest extends AbstractMigration | ||
{ | ||
const TABLE_NAME = 'test_add_sql_post_up_table'; | ||
|
||
public function preUp(Schema $schema) | ||
{ | ||
$this->addSql( | ||
sprintf("INSERT INTO %s (test) values (?)", self::TABLE_NAME), | ||
[1] | ||
); | ||
} | ||
|
||
public function up(Schema $schema) | ||
{ | ||
$this->addSql( | ||
sprintf("INSERT INTO %s (test) values (?)", self::TABLE_NAME), | ||
[2] | ||
); | ||
} | ||
|
||
public function postUp(Schema $schema) | ||
{ | ||
$this->addSql( | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
mikeSimonson
Author
Contributor
|
||
sprintf("INSERT INTO %s (test) values (?)", self::TABLE_NAME), | ||
[3] | ||
); | ||
} | ||
|
||
public function preDown(Schema $schema) | ||
{ | ||
$this->addSql( | ||
sprintf("INSERT INTO %s (test) values (?)", self::TABLE_NAME), | ||
[4] | ||
); | ||
} | ||
|
||
public function down(Schema $schema) | ||
{ | ||
$this->addSql( | ||
sprintf("INSERT INTO %s (test) values (?)", self::TABLE_NAME), | ||
[5] | ||
); | ||
} | ||
|
||
public function postDown(Schema $schema) | ||
{ | ||
$this->addSql( | ||
sprintf("INSERT INTO %s (test) values (?)", self::TABLE_NAME), | ||
[6] | ||
); | ||
} | ||
} |
This file was deleted.
this makes no sense. post* methods cannot add SQL as the SQL has already run. If they want to do things here, they need to use the connection