From dd15857edae259d9d08eb731c9b84d673b3ec4c8 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Sun, 15 Feb 2015 22:44:42 -0500 Subject: [PATCH] Fixed test break. --- tests/unit/data/cubrid.sql | 9 +++++++++ tests/unit/data/mssql.sql | 11 +++++++++++ tests/unit/data/postgres.sql | 10 ++++++++++ tests/unit/data/sqlite.sql | 9 +++++++++ 4 files changed, 39 insertions(+) diff --git a/tests/unit/data/cubrid.sql b/tests/unit/data/cubrid.sql index 6b21712f8a..37af703edf 100644 --- a/tests/unit/data/cubrid.sql +++ b/tests/unit/data/cubrid.sql @@ -124,6 +124,15 @@ CREATE TABLE "composite_fk" ( CONSTRAINT "FK_composite_fk_order_item" FOREIGN KEY ("order_id","item_id") REFERENCES "order_item" ("order_id","item_id") ON DELETE CASCADE ); +CREATE TABLE "animal" ( + "id" int(11) NOT NULL AUTO_INCREMENT, + "type" varchar(255) NOT NULL, + PRIMARY KEY ("id") +); + +INSERT INTO "animal" ("type") VALUES ('yiiunit\data\ar\Cat'); +INSERT INTO "animal" ("type") VALUES ('yiiunit\data\ar\Dog'); + INSERT INTO "profile" (description) VALUES ('profile customer 1'); INSERT INTO "profile" (description) VALUES ('profile customer 3'); diff --git a/tests/unit/data/mssql.sql b/tests/unit/data/mssql.sql index 3c7fbf12af..b1907d6895 100644 --- a/tests/unit/data/mssql.sql +++ b/tests/unit/data/mssql.sql @@ -105,6 +105,17 @@ CREATE TABLE [dbo].[type] ( [bool_col2] [tinyint] DEFAULT '1' ); +CREATE TABLE [dbo].[animal] ( + [id] [int] IDENTITY(1,1) NOT NULL, + [type] [varchar](255) NOT NULL, + CONSTRAINT [PK_animal] PRIMARY KEY CLUSTERED ( + [id] ASC + ) ON [PRIMARY] +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT INTO [dbo].[animal] (type) VALUES ('yiiunit\data\ar\Cat'); +INSERT INTO [dbo].[animal] (type) VALUES ('yiiunit\data\ar\Dog'); + INSERT INTO [dbo].[profile] ([description]) VALUES ('profile customer 1'); INSERT INTO [dbo].[profile] ([description]) VALUES ('profile customer 3'); diff --git a/tests/unit/data/postgres.sql b/tests/unit/data/postgres.sql index 4c23a1bcd7..21b12531f7 100644 --- a/tests/unit/data/postgres.sql +++ b/tests/unit/data/postgres.sql @@ -123,6 +123,16 @@ CREATE TABLE "bool_values" ( default_false boolean not null default false ); + +CREATE TABLE `animal` ( + id serial primary key, + type varchar(255) not null +); + +INSERT INTO "animal" (type) VALUES ('yiiunit\data\ar\Cat'); +INSERT INTO "animal" (type) VALUES ('yiiunit\data\ar\Dog'); + + INSERT INTO "profile" (description) VALUES ('profile customer 1'); INSERT INTO "profile" (description) VALUES ('profile customer 3'); diff --git a/tests/unit/data/sqlite.sql b/tests/unit/data/sqlite.sql index ca696fbb1e..22e69782ff 100644 --- a/tests/unit/data/sqlite.sql +++ b/tests/unit/data/sqlite.sql @@ -108,6 +108,15 @@ CREATE TABLE "type" ( ts_default TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ); +CREATE TABLE "animal" ( + id INTEGER NOT NULL, + type VARCHAR(255) NOT NULL, + PRIMARY KEY (id) +); + +INSERT INTO "animal" ("type") VALUES ('yiiunit\data\ar\Cat'); +INSERT INTO "animal" ("type") VALUES ('yiiunit\data\ar\Dog'); + INSERT INTO "profile" (description) VALUES ('profile customer 1'); INSERT INTO "profile" (description) VALUES ('profile customer 3');