mirror of
https://github.com/stackrender/stackrender.git
synced 2026-10-26 22:10:49 +00:00
Update DDL rendering tests for quoted identifiers
This commit is contained in:
@@ -101,9 +101,10 @@ describe("getRenderer().renderDDL - emitted DDL across dialects", () => {
|
||||
|
||||
it("emits the foreign key from posts to users with ON DELETE CASCADE", async () => {
|
||||
const sql = await render(c.dialect);
|
||||
|
||||
expect(sql).toMatch(/FOREIGN KEY\s*\(\s*user_id\s*\)/i);
|
||||
expect(sql).toMatch(/REFERENCES\s+[`"]?users[`"]?\s*\(\s*id\s*\)/i);
|
||||
expect(sql).toMatch(/FOREIGN KEY\s*\(\s*[`"]?user_id[`"]?\s*\)/i);
|
||||
expect(sql).toMatch(
|
||||
/REFERENCES\s+[`"]?users[`"]?\s*\(\s*[`"]?id[`"]?\s*\)/i
|
||||
);
|
||||
expect(sql).toMatch(/ON DELETE CASCADE/i);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user