File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -228,7 +228,7 @@ describe("create table", () => {
228228 it ( `formats CREATE TABLE with named column constraints` , async ( ) => {
229229 await test ( dedent `
230230 CREATE TABLE client (
231- id INT CONSTRAINT NOT NULL CONSTRAINT prim_key PRIMARY KEY
231+ id INT CONSTRAINT foo NOT NULL CONSTRAINT prim_key PRIMARY KEY
232232 )
233233 ` ) ;
234234 } ) ;
@@ -244,6 +244,15 @@ describe("create table", () => {
244244 ` ) ;
245245 } ) ;
246246
247+ it ( `formats CREATE TABLE with unnamed table and column constraints` , async ( ) => {
248+ await testMysql ( dedent `
249+ CREATE TABLE client (
250+ id INT CONSTRAINT CHECK (TRUE),
251+ CONSTRAINT CHECK (id > 0)
252+ )
253+ ` ) ;
254+ } ) ;
255+
247256 it ( `formats constraints with ON CONFLICT clause` , async ( ) => {
248257 await test ( dedent `
249258 CREATE TABLE client (
You can’t perform that action at this time.
0 commit comments