Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

Commit

Permalink
add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
do4gr committed Aug 8, 2019
1 parent cba3adc commit 3df4b5b
Showing 1 changed file with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -460,4 +460,36 @@ class ExistingDatabasesSpec extends WordSpecLike with Matchers with PassiveDeplo
column.typeIdentifier should be(TI.Float)
column.isRequired should be(false)
}

"Encountering an unsupported type should not error and just ignore the column" in {
val postgres =
s"""
| CREATE TABLE blog (
| id SERIAL PRIMARY KEY, -- implicit primary key constraint
| test DATE
|);
""".stripMargin

val mysql =
s"""
| CREATE TABLE blog (
| id int NOT NULL,
| PRIMARY KEY(id),
| test DATE
| );
""".stripMargin

val initialResult = setup(SQLs(postgres = postgres, mysql = mysql, sqlite = ""))

val dataModel =
s"""
|type Blog @db(name: "blog"){
| id: Int! @id
|}
""".stripMargin

val result = deploy(dataModel, ConnectorCapabilities(IntIdCapability))

result should equal(initialResult)
}
}

0 comments on commit 3df4b5b

Please sign in to comment.