You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/sqlite.spec.js
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -206,4 +206,11 @@ describe('sqlite', () => {
206
206
sql='CREATE INDEX if not exists schema_name.visits_url_index ON visits (url collate cn asc) where id > 10;'
207
207
expect(getParsedSql(sql)).to.be.equal('CREATE INDEX IF NOT EXISTS "schema_name"."visits_url_index" ON "visits" ("url" COLLATE cn ASC) WHERE "id" > 10')
208
208
})
209
+
it('should support constraint in create table',()=>{
210
+
constsql=`CREATE TABLE IF NOT EXISTS "__EFMigrationsHistory" (
211
+
"MigrationId" TEXT NOT NULL CONSTRAINT "PK___EFMigrationsHistory" PRIMARY KEY,
212
+
"ProductVersion" TEXT NOT NULL
213
+
);`
214
+
expect(getParsedSql(sql)).to.be.equal(`CREATE TABLE IF NOT EXISTS "__EFMigrationsHistory" ("MigrationId" TEXT NOT NULL CONSTRAINT "PK___EFMigrationsHistory" PRIMARY KEY, "ProductVersion" TEXT NOT NULL)`)
0 commit comments