$this->assertEqual($this->adapter->pop(),'CREATE TABLE sometable (id INT UNSIGNED AUTO_INCREMENT, name VARCHAR(4), INDEX myindex_idx (name), PRIMARY KEY(id)) ENGINE = INNODB');
$this->assertEqual($this->adapter->pop(),'CREATE TABLE sometable (id INT UNSIGNED AUTO_INCREMENT, name VARCHAR(4) DEFAULT NULL, INDEX myindex_idx (name), PRIMARY KEY(id)) ENGINE = INNODB');
$this->assertEqual($this->adapter->pop(),'CREATE TABLE sometable (id INT UNSIGNED AUTO_INCREMENT, name VARCHAR(4), INDEX myindex_idx (id ASC, name DESC), PRIMARY KEY(id)) ENGINE = INNODB');
$this->assertEqual($this->adapter->pop(),'CREATE TABLE sometable (id INT UNSIGNED AUTO_INCREMENT, name VARCHAR(4) DEFAULT NULL, INDEX myindex_idx (id ASC, name DESC), PRIMARY KEY(id)) ENGINE = INNODB');
$this->assertEqual($sql[0],'CREATE TABLE sometable (id INT UNIQUE, name VARCHAR2(4), PRIMARY KEY(id), INDEX myindex (id, name))');
$this->assertEqual($sql[0],'CREATE TABLE sometable (id INT DEFAULT NULL UNIQUE, name VARCHAR2(4) DEFAULT NULL, PRIMARY KEY(id), INDEX myindex (id, name))');
$this->assertEqual($sql[0],'CREATE TABLE foreign_key_test (id BIGINT AUTO_INCREMENT, name TEXT, code INT, content TEXT, parent_id BIGINT, INDEX parent_id_idx (parent_id), PRIMARY KEY(id)) ENGINE = INNODB');
$this->assertEqual($sql[0],'CREATE TABLE foreign_key_test (id BIGINT AUTO_INCREMENT, name TEXT DEFAULT NULL, code INT DEFAULT NULL, content TEXT DEFAULT NULL, parent_id BIGINT DEFAULT NULL, INDEX parent_id_idx (parent_id), PRIMARY KEY(id)) ENGINE = INNODB');
if(isset($sql[1])){
if(isset($sql[1])){
$this->assertEqual($sql[1],'ALTER TABLE foreign_key_test ADD FOREIGN KEY (parent_id) REFERENCES foreign_key_test(id) ON UPDATE RESTRICT ON DELETE CASCADE');
$this->assertEqual($sql[1],'ALTER TABLE foreign_key_test ADD FOREIGN KEY (parent_id) REFERENCES foreign_key_test(id) ON UPDATE RESTRICT ON DELETE CASCADE');
}else{
}else{
...
@@ -61,21 +61,21 @@ class Doctrine_Export_Record_TestCase extends Doctrine_UnitTestCase
...
@@ -61,21 +61,21 @@ class Doctrine_Export_Record_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($sql[0],'CREATE TABLE mysql_index_test_record (id BIGINT AUTO_INCREMENT, name TEXT, code INT, content TEXT, FULLTEXT INDEX content_idx (content), UNIQUE INDEX namecode_idx (name, code), PRIMARY KEY(id)) ENGINE = MYISAM');
$this->assertEqual($sql[0],'CREATE TABLE mysql_index_test_record (id BIGINT AUTO_INCREMENT, name TEXT DEFAULT NULL, code INT DEFAULT NULL, content TEXT DEFAULT NULL, FULLTEXT INDEX content_idx (content), UNIQUE INDEX namecode_idx (name, code), PRIMARY KEY(id)) ENGINE = MYISAM');
$this->assertEqual($sql[0],'CREATE TABLE foreign_key_test (id BIGINT AUTO_INCREMENT, name TEXT, code INT, content TEXT, parent_id BIGINT, INDEX parent_id_idx (parent_id), PRIMARY KEY(id)) ENGINE = INNODB');
$this->assertEqual($sql[0],'CREATE TABLE foreign_key_test (id BIGINT AUTO_INCREMENT, name TEXT DEFAULT NULL, code INT DEFAULT NULL, content TEXT DEFAULT NULL, parent_id BIGINT DEFAULT NULL, INDEX parent_id_idx (parent_id), PRIMARY KEY(id)) ENGINE = INNODB');
if(isset($sql[1])){
if(isset($sql[1])){
$this->assertEqual($sql[1],'ALTER TABLE foreign_key_test ADD FOREIGN KEY (parent_id) REFERENCES foreign_key_test(id) ON UPDATE RESTRICT ON DELETE CASCADE');
$this->assertEqual($sql[1],'ALTER TABLE foreign_key_test ADD FOREIGN KEY (parent_id) REFERENCES foreign_key_test(id) ON UPDATE RESTRICT ON DELETE CASCADE');
}else{
}else{
...
@@ -87,25 +87,20 @@ class Doctrine_Export_Record_TestCase extends Doctrine_UnitTestCase
...
@@ -87,25 +87,20 @@ class Doctrine_Export_Record_TestCase extends Doctrine_UnitTestCase
$this->assertTrue($this->adapter->pop(),'CREATE TABLE cms__category_languages (id BIGINT AUTO_INCREMENT, name TEXT DEFAULT NULL, category_id BIGINT DEFAULT NULL, language_id BIGINT DEFAULT NULL, INDEX index_category_idx (category_id), INDEX index_language_idx (language_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = INNODB');
'CREATE TABLE cms__category_languages (id BIGINT AUTO_INCREMENT, name TEXT, category_id BIGINT, language_id BIGINT, INDEX index_category_idx (category_id), INDEX index_language_idx (language_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = INNODB',
$this->assertTrue($this->adapter->pop(),'CREATE TABLE cms__category (id BIGINT AUTO_INCREMENT, created DATETIME DEFAULT NULL, parent BIGINT DEFAULT NULL, position MEDIUMINT DEFAULT NULL, active BIGINT DEFAULT NULL, INDEX index_parent_idx (parent), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = INNODB');
'CREATE TABLE cms__category (id BIGINT AUTO_INCREMENT, created DATETIME, parent BIGINT, position MEDIUMINT, active BIGINT, INDEX index_parent_idx (parent), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = INNODB'