@@ -397,14 +397,14 @@ test('rename column #3. Part of check constraint', async (t) => {
397397 newSchema,
398398 users : newSchema . table ( 'users' , {
399399 id : int ( 'id' ) ,
400- } , ( t ) => [ check ( 'hey' , sql `${ t . id } !== 2` ) ] ) ,
400+ } , ( t ) => [ check ( 'hey' , sql `${ t . id } != 2` ) ] ) ,
401401 } ;
402402
403403 const schema2 = {
404404 newSchema,
405405 users : newSchema . table ( 'users' , {
406406 id : int ( 'id1' ) ,
407- } , ( t ) => [ check ( 'hey' , sql `${ t . id } !== 2` ) ] ) ,
407+ } , ( t ) => [ check ( 'hey' , sql `${ t . id } != 2` ) ] ) ,
408408 } ;
409409
410410 const { sqlStatements : st } = await diff ( schema1 , schema2 , [
@@ -425,7 +425,7 @@ test('rename column #3. Part of check constraint', async (t) => {
425425 expect ( st ) . toStrictEqual ( [
426426 `ALTER TABLE [new_schema].[users] DROP CONSTRAINT [hey];` ,
427427 `EXEC sp_rename 'new_schema.users.id', [id1], 'COLUMN';` ,
428- `ALTER TABLE [new_schema].[users] ADD CONSTRAINT [hey] CHECK ([users].[id1] !== 2);` ,
428+ `ALTER TABLE [new_schema].[users] ADD CONSTRAINT [hey] CHECK ([users].[id1] != 2);` ,
429429 ] ) ;
430430 // error expected
431431 // since there will be changes in defintion
@@ -448,7 +448,7 @@ test('drop column #1. Part of check constraint', async (t) => {
448448 users : newSchema . table ( 'users' , {
449449 id : int ( 'id' ) ,
450450 name : varchar ( 'name' ) ,
451- } , ( t ) => [ check ( 'hey' , sql `${ t . id } !== 2` ) ] ) ,
451+ } , ( t ) => [ check ( 'hey' , sql `${ t . id } != 2` ) ] ) ,
452452 } ;
453453
454454 const schema2 = {
@@ -1492,14 +1492,14 @@ test('drop identity from existing column #10. Table has checks', async (t) => {
14921492 {
14931493 id : int ( 'id' ) . identity ( ) ,
14941494 } ,
1495- ( t ) => [ check ( 'hello_world' , sql `${ t . id } !== 1` ) ] ,
1495+ ( t ) => [ check ( 'hello_world' , sql `${ t . id } != 1` ) ] ,
14961496 ) ,
14971497 } ;
14981498
14991499 const schema2 = {
15001500 users : mssqlTable ( 'users' , {
15011501 id : int ( 'id' ) ,
1502- } , ( t ) => [ check ( 'hello_world' , sql `${ t . id } !== 1` ) ] ) ,
1502+ } , ( t ) => [ check ( 'hello_world' , sql `${ t . id } != 1` ) ] ) ,
15031503 } ;
15041504
15051505 const { sqlStatements : st } = await diff ( schema1 , schema2 , [ ] ) ;
@@ -1516,7 +1516,7 @@ test('drop identity from existing column #10. Table has checks', async (t) => {
15161516 `ALTER TABLE [users] ADD [id] int;` ,
15171517 `INSERT INTO [users] ([id]) SELECT [__old_id] FROM [users];` ,
15181518 `ALTER TABLE [users] DROP COLUMN [__old_id];` ,
1519- 'ALTER TABLE [users] ADD CONSTRAINT [hello_world] CHECK ([users].[id] !== 1);' ,
1519+ 'ALTER TABLE [users] ADD CONSTRAINT [hello_world] CHECK ([users].[id] != 1);' ,
15201520 ] ;
15211521 expect ( st ) . toStrictEqual ( st0 ) ;
15221522 expect ( pst ) . toStrictEqual ( st0 ) ;
@@ -1531,15 +1531,15 @@ test('drop identity from existing column #11. Table has checks. Column is not in
15311531 id : int ( 'id' ) . identity ( ) ,
15321532 name : varchar ( ) ,
15331533 } ,
1534- ( t ) => [ check ( 'hello_world' , sql `${ t . name } !== 'Alex'` ) ] ,
1534+ ( t ) => [ check ( 'hello_world' , sql `${ t . name } != 'Alex'` ) ] ,
15351535 ) ,
15361536 } ;
15371537
15381538 const schema2 = {
15391539 users : mssqlTable ( 'users' , {
15401540 id : int ( 'id' ) ,
15411541 name : varchar ( ) ,
1542- } , ( t ) => [ check ( 'hello_world' , sql `${ t . name } !== 'Alex'` ) ] ) ,
1542+ } , ( t ) => [ check ( 'hello_world' , sql `${ t . name } != 'Alex'` ) ] ) ,
15431543 } ;
15441544
15451545 const { sqlStatements : st } = await diff ( schema1 , schema2 , [ ] ) ;
@@ -1556,7 +1556,7 @@ test('drop identity from existing column #11. Table has checks. Column is not in
15561556 `ALTER TABLE [users] ADD [id] int;` ,
15571557 `INSERT INTO [users] ([id]) SELECT [__old_id] FROM [users];` ,
15581558 `ALTER TABLE [users] DROP COLUMN [__old_id];` ,
1559- "ALTER TABLE [users] ADD CONSTRAINT [hello_world] CHECK ([users].[name] !== 'Alex');" ,
1559+ "ALTER TABLE [users] ADD CONSTRAINT [hello_world] CHECK ([users].[name] != 'Alex');" ,
15601560 ] ;
15611561
15621562 expect ( st ) . toStrictEqual ( st0 ) ;
@@ -1571,15 +1571,15 @@ test('drop identity from existing column #12. Rename table. Table has checks', a
15711571 id : int ( 'id' ) . identity ( ) ,
15721572 name : varchar ( ) ,
15731573 } ,
1574- ( t ) => [ check ( 'hello_world' , sql `${ t . name } !== 'Alex'` ) ] ,
1574+ ( t ) => [ check ( 'hello_world' , sql `${ t . name } != 'Alex'` ) ] ,
15751575 ) ,
15761576 } ;
15771577
15781578 const schema2 = {
15791579 users : mssqlTable ( 'users2' , {
15801580 id : int ( 'id' ) ,
15811581 name : varchar ( ) ,
1582- } , ( t ) => [ check ( 'hello_world' , sql `${ t . name } !== 'Alex'` ) ] ) ,
1582+ } , ( t ) => [ check ( 'hello_world' , sql `${ t . name } != 'Alex'` ) ] ) ,
15831583 } ;
15841584
15851585 const { sqlStatements : st } = await diff ( schema1 , schema2 , [ `dbo.users->dbo.users2` ] ) ;
@@ -1598,7 +1598,7 @@ test('drop identity from existing column #12. Rename table. Table has checks', a
15981598 `ALTER TABLE [users2] ADD [id] int;` ,
15991599 `INSERT INTO [users2] ([id]) SELECT [__old_id] FROM [users2];` ,
16001600 `ALTER TABLE [users2] DROP COLUMN [__old_id];` ,
1601- "ALTER TABLE [users2] ADD CONSTRAINT [hello_world] CHECK ([users2].[name] !== 'Alex');" ,
1601+ "ALTER TABLE [users2] ADD CONSTRAINT [hello_world] CHECK ([users2].[name] != 'Alex');" ,
16021602 ] ;
16031603
16041604 expect ( st ) . toStrictEqual ( st0 ) ;
@@ -1620,7 +1620,7 @@ test('drop identity from existing column #13. Rename table + Rename column. Add
16201620 users : mssqlTable ( 'users2' , {
16211621 id : int ( 'id1' ) ,
16221622 name : varchar ( ) ,
1623- } , ( t ) => [ check ( 'hello_world' , sql `${ t . name } !== 'Alex'` ) ] ) ,
1623+ } , ( t ) => [ check ( 'hello_world' , sql `${ t . name } != 'Alex'` ) ] ) ,
16241624 } ;
16251625
16261626 const { sqlStatements : st } = await diff ( schema1 , schema2 , [
@@ -1642,7 +1642,7 @@ test('drop identity from existing column #13. Rename table + Rename column. Add
16421642 `ALTER TABLE [users2] ADD [id1] int;` ,
16431643 `INSERT INTO [users2] ([id1]) SELECT [__old_id1] FROM [users2];` ,
16441644 `ALTER TABLE [users2] DROP COLUMN [__old_id1];` ,
1645- "ALTER TABLE [users2] ADD CONSTRAINT [hello_world] CHECK ([users2].[name] !== 'Alex');" ,
1645+ "ALTER TABLE [users2] ADD CONSTRAINT [hello_world] CHECK ([users2].[name] != 'Alex');" ,
16461646 ] ;
16471647 expect ( st ) . toStrictEqual ( st0 ) ;
16481648 expect ( pst ) . toStrictEqual ( st0 ) ;
@@ -1656,7 +1656,7 @@ test('drop identity from existing column #14. Rename table + Rename column. Drop
16561656 id : int ( 'id' ) . identity ( ) ,
16571657 name : varchar ( ) ,
16581658 } ,
1659- ( t ) => [ check ( 'hello_world' , sql `${ t . name } !== 'Alex'` ) ] ,
1659+ ( t ) => [ check ( 'hello_world' , sql `${ t . name } != 'Alex'` ) ] ,
16601660 ) ,
16611661 } ;
16621662
@@ -1700,15 +1700,15 @@ test('drop identity from existing column #15. Rename table + Rename column. Tabl
17001700 id : int ( 'id' ) . identity ( ) ,
17011701 name : varchar ( ) ,
17021702 } ,
1703- ( t ) => [ check ( 'hello_world' , sql `${ t . name } !== 'Alex'` ) ] ,
1703+ ( t ) => [ check ( 'hello_world' , sql `${ t . name } != 'Alex'` ) ] ,
17041704 ) ,
17051705 } ;
17061706
17071707 const schema2 = {
17081708 users : mssqlTable ( 'users2' , {
17091709 id : int ( 'id1' ) ,
17101710 name : varchar ( ) ,
1711- } , ( t ) => [ check ( 'hello_world' , sql `${ t . name } !== 'Alex'` ) ] ) ,
1711+ } , ( t ) => [ check ( 'hello_world' , sql `${ t . name } != 'Alex'` ) ] ) ,
17121712 } ;
17131713
17141714 const { sqlStatements : st } = await diff ( schema1 , schema2 , [
@@ -1731,7 +1731,7 @@ test('drop identity from existing column #15. Rename table + Rename column. Tabl
17311731 `ALTER TABLE [users2] ADD [id1] int;` ,
17321732 `INSERT INTO [users2] ([id1]) SELECT [__old_id1] FROM [users2];` ,
17331733 `ALTER TABLE [users2] DROP COLUMN [__old_id1];` ,
1734- "ALTER TABLE [users2] ADD CONSTRAINT [hello_world] CHECK ([users2].[name] !== 'Alex');" ,
1734+ "ALTER TABLE [users2] ADD CONSTRAINT [hello_world] CHECK ([users2].[name] != 'Alex');" ,
17351735 ] ;
17361736 expect ( st ) . toStrictEqual ( st0 ) ;
17371737 expect ( pst ) . toStrictEqual ( st0 ) ;
0 commit comments