@dbml/cli 6.2.0-alpha.0 → 6.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -44,14 +44,14 @@ CREATE TABLE "countries" (
44
44
 
45
45
  CREATE INDEX "product_status" ON "products" ("merchant_id", "status");
46
46
 
47
- ALTER TABLE "order_items" ADD FOREIGN KEY ("order_id") REFERENCES "orders" ("id") DEFERRABLE INITIALLY IMMEDIATE;
47
+ ALTER TABLE "order_items" ADD FOREIGN KEY ("order_id") REFERENCES "orders" ("id");
48
48
 
49
- ALTER TABLE "order_items" ADD FOREIGN KEY ("product_id") REFERENCES "products" ("id") DEFERRABLE INITIALLY IMMEDIATE;
49
+ ALTER TABLE "order_items" ADD FOREIGN KEY ("product_id") REFERENCES "products" ("id");
50
50
 
51
- ALTER TABLE "users" ADD FOREIGN KEY ("country_code") REFERENCES "countries" ("code") DEFERRABLE INITIALLY IMMEDIATE;
51
+ ALTER TABLE "users" ADD FOREIGN KEY ("country_code") REFERENCES "countries" ("code");
52
52
 
53
- ALTER TABLE "merchants" ADD FOREIGN KEY ("country_code") REFERENCES "countries" ("code") DEFERRABLE INITIALLY IMMEDIATE;
53
+ ALTER TABLE "merchants" ADD FOREIGN KEY ("country_code") REFERENCES "countries" ("code");
54
54
 
55
- ALTER TABLE "products" ADD FOREIGN KEY ("merchant_id") REFERENCES "merchants" ("id") DEFERRABLE INITIALLY IMMEDIATE;
55
+ ALTER TABLE "products" ADD FOREIGN KEY ("merchant_id") REFERENCES "merchants" ("id");
56
56
 
57
- ALTER TABLE "merchants" ADD FOREIGN KEY ("admin_id") REFERENCES "users" ("id") DEFERRABLE INITIALLY IMMEDIATE;
57
+ ALTER TABLE "merchants" ADD FOREIGN KEY ("admin_id") REFERENCES "users" ("id");
@@ -44,15 +44,15 @@ CREATE TABLE "countries" (
44
44
 
45
45
  CREATE INDEX "product_status" ON "products" ("merchant_id", "status");
46
46
 
47
- ALTER TABLE "order_items" ADD FOREIGN KEY ("order_id") REFERENCES "orders" ("id") DEFERRABLE INITIALLY IMMEDIATE;
47
+ ALTER TABLE "order_items" ADD FOREIGN KEY ("order_id") REFERENCES "orders" ("id");
48
48
 
49
- ALTER TABLE "order_items" ADD FOREIGN KEY ("product_id") REFERENCES "products" ("id") DEFERRABLE INITIALLY IMMEDIATE;
49
+ ALTER TABLE "order_items" ADD FOREIGN KEY ("product_id") REFERENCES "products" ("id");
50
50
 
51
- ALTER TABLE "users" ADD FOREIGN KEY ("country_code") REFERENCES "countries" ("code") DEFERRABLE INITIALLY IMMEDIATE;
51
+ ALTER TABLE "users" ADD FOREIGN KEY ("country_code") REFERENCES "countries" ("code");
52
52
 
53
- ALTER TABLE "merchants" ADD FOREIGN KEY ("country_code") REFERENCES "countries" ("code") DEFERRABLE INITIALLY IMMEDIATE;
53
+ ALTER TABLE "merchants" ADD FOREIGN KEY ("country_code") REFERENCES "countries" ("code");
54
54
 
55
- ALTER TABLE "products" ADD FOREIGN KEY ("merchant_id") REFERENCES "merchants" ("id") DEFERRABLE INITIALLY IMMEDIATE;
55
+ ALTER TABLE "products" ADD FOREIGN KEY ("merchant_id") REFERENCES "merchants" ("id");
56
56
 
57
- ALTER TABLE "merchants" ADD FOREIGN KEY ("admin_id") REFERENCES "users" ("id") DEFERRABLE INITIALLY IMMEDIATE;
57
+ ALTER TABLE "merchants" ADD FOREIGN KEY ("admin_id") REFERENCES "users" ("id");
58
58
 
@@ -39,15 +39,15 @@ CREATE TABLE "rental" (
39
39
  "last_update" timestamp
40
40
  );
41
41
 
42
- ALTER TABLE "staff" ADD FOREIGN KEY ("store_id") REFERENCES "store" ("id") DEFERRABLE INITIALLY IMMEDIATE;
42
+ ALTER TABLE "staff" ADD FOREIGN KEY ("store_id") REFERENCES "store" ("id");
43
43
 
44
- ALTER TABLE "store" ADD FOREIGN KEY ("manager_staff_id") REFERENCES "staff" ("id") DEFERRABLE INITIALLY IMMEDIATE;
44
+ ALTER TABLE "store" ADD FOREIGN KEY ("manager_staff_id") REFERENCES "staff" ("id");
45
45
 
46
- ALTER TABLE "payment" ADD FOREIGN KEY ("staff_id") REFERENCES "staff" ("id") DEFERRABLE INITIALLY IMMEDIATE;
46
+ ALTER TABLE "payment" ADD FOREIGN KEY ("staff_id") REFERENCES "staff" ("id");
47
47
 
48
- ALTER TABLE "payment" ADD FOREIGN KEY ("rental_id") REFERENCES "rental" ("id") DEFERRABLE INITIALLY IMMEDIATE;
48
+ ALTER TABLE "payment" ADD FOREIGN KEY ("rental_id") REFERENCES "rental" ("id");
49
49
 
50
- ALTER TABLE "rental" ADD FOREIGN KEY ("staff_id") REFERENCES "staff" ("id") DEFERRABLE INITIALLY IMMEDIATE;
50
+ ALTER TABLE "rental" ADD FOREIGN KEY ("staff_id") REFERENCES "staff" ("id");
51
51
  CREATE TABLE "country" (
52
52
  "id" int PRIMARY KEY,
53
53
  "country" nvarchar2(255),
@@ -86,11 +86,11 @@ CREATE TABLE "customer" (
86
86
 
87
87
  CREATE INDEX "IDX_CUSTOMER" ON "customer" ("id", "first_name");
88
88
 
89
- ALTER TABLE "city" ADD FOREIGN KEY ("country_id") REFERENCES "country" ("id") DEFERRABLE INITIALLY IMMEDIATE;
89
+ ALTER TABLE "city" ADD FOREIGN KEY ("country_id") REFERENCES "country" ("id");
90
90
 
91
- ALTER TABLE "address" ADD FOREIGN KEY ("city_id") REFERENCES "city" ("id") DEFERRABLE INITIALLY IMMEDIATE;
91
+ ALTER TABLE "address" ADD FOREIGN KEY ("city_id") REFERENCES "city" ("id");
92
92
 
93
- ALTER TABLE "customer" ADD FOREIGN KEY ("address_id") REFERENCES "address" ("id") DEFERRABLE INITIALLY IMMEDIATE;
93
+ ALTER TABLE "customer" ADD FOREIGN KEY ("address_id") REFERENCES "address" ("id");
94
94
  CREATE TABLE "category" (
95
95
  "id" int PRIMARY KEY,
96
96
  "name" nvarchar2(255),
@@ -153,16 +153,16 @@ CREATE TABLE "inventory" (
153
153
  "last_update" timestamp
154
154
  );
155
155
 
156
- ALTER TABLE "film_category" ADD FOREIGN KEY ("category_id") REFERENCES "category" ("id") DEFERRABLE INITIALLY IMMEDIATE;
156
+ ALTER TABLE "film_category" ADD FOREIGN KEY ("category_id") REFERENCES "category" ("id");
157
157
 
158
- ALTER TABLE "film_text" ADD FOREIGN KEY ("film_id") REFERENCES "film" ("id") DEFERRABLE INITIALLY IMMEDIATE;
158
+ ALTER TABLE "film_text" ADD FOREIGN KEY ("film_id") REFERENCES "film" ("id");
159
159
 
160
- ALTER TABLE "film" ADD FOREIGN KEY ("language_id") REFERENCES "language" ("id") DEFERRABLE INITIALLY IMMEDIATE;
160
+ ALTER TABLE "film" ADD FOREIGN KEY ("language_id") REFERENCES "language" ("id");
161
161
 
162
- ALTER TABLE "film" ADD FOREIGN KEY ("original_language_id") REFERENCES "language" ("id") DEFERRABLE INITIALLY IMMEDIATE;
162
+ ALTER TABLE "film" ADD FOREIGN KEY ("original_language_id") REFERENCES "language" ("id");
163
163
 
164
- ALTER TABLE "film_actor" ADD FOREIGN KEY ("film_id") REFERENCES "film" ("id") DEFERRABLE INITIALLY IMMEDIATE;
164
+ ALTER TABLE "film_actor" ADD FOREIGN KEY ("film_id") REFERENCES "film" ("id");
165
165
 
166
- ALTER TABLE "film_actor" ADD FOREIGN KEY ("actor_id") REFERENCES "actor" ("id") DEFERRABLE INITIALLY IMMEDIATE;
166
+ ALTER TABLE "film_actor" ADD FOREIGN KEY ("actor_id") REFERENCES "actor" ("id");
167
167
 
168
- ALTER TABLE "inventory" ADD FOREIGN KEY ("film_id") REFERENCES "film" ("id") DEFERRABLE INITIALLY IMMEDIATE;
168
+ ALTER TABLE "inventory" ADD FOREIGN KEY ("film_id") REFERENCES "film" ("id");
@@ -39,15 +39,15 @@ CREATE TABLE "rental" (
39
39
  "last_update" timestamp
40
40
  );
41
41
 
42
- ALTER TABLE "staff" ADD FOREIGN KEY ("store_id") REFERENCES "store" ("id") DEFERRABLE INITIALLY IMMEDIATE;
42
+ ALTER TABLE "staff" ADD FOREIGN KEY ("store_id") REFERENCES "store" ("id");
43
43
 
44
- ALTER TABLE "store" ADD FOREIGN KEY ("manager_staff_id") REFERENCES "staff" ("id") DEFERRABLE INITIALLY IMMEDIATE;
44
+ ALTER TABLE "store" ADD FOREIGN KEY ("manager_staff_id") REFERENCES "staff" ("id");
45
45
 
46
- ALTER TABLE "payment" ADD FOREIGN KEY ("staff_id") REFERENCES "staff" ("id") DEFERRABLE INITIALLY IMMEDIATE;
46
+ ALTER TABLE "payment" ADD FOREIGN KEY ("staff_id") REFERENCES "staff" ("id");
47
47
 
48
- ALTER TABLE "payment" ADD FOREIGN KEY ("rental_id") REFERENCES "rental" ("id") DEFERRABLE INITIALLY IMMEDIATE;
48
+ ALTER TABLE "payment" ADD FOREIGN KEY ("rental_id") REFERENCES "rental" ("id");
49
49
 
50
- ALTER TABLE "rental" ADD FOREIGN KEY ("staff_id") REFERENCES "staff" ("id") DEFERRABLE INITIALLY IMMEDIATE;
50
+ ALTER TABLE "rental" ADD FOREIGN KEY ("staff_id") REFERENCES "staff" ("id");
51
51
 
52
52
  CREATE TABLE "country" (
53
53
  "id" int PRIMARY KEY,
@@ -87,11 +87,11 @@ CREATE TABLE "customer" (
87
87
 
88
88
  CREATE INDEX "IDX_CUSTOMER" ON "customer" ("id", "first_name");
89
89
 
90
- ALTER TABLE "city" ADD FOREIGN KEY ("country_id") REFERENCES "country" ("id") DEFERRABLE INITIALLY IMMEDIATE;
90
+ ALTER TABLE "city" ADD FOREIGN KEY ("country_id") REFERENCES "country" ("id");
91
91
 
92
- ALTER TABLE "address" ADD FOREIGN KEY ("city_id") REFERENCES "city" ("id") DEFERRABLE INITIALLY IMMEDIATE;
92
+ ALTER TABLE "address" ADD FOREIGN KEY ("city_id") REFERENCES "city" ("id");
93
93
 
94
- ALTER TABLE "customer" ADD FOREIGN KEY ("address_id") REFERENCES "address" ("id") DEFERRABLE INITIALLY IMMEDIATE;
94
+ ALTER TABLE "customer" ADD FOREIGN KEY ("address_id") REFERENCES "address" ("id");
95
95
 
96
96
  CREATE TABLE "category" (
97
97
  "id" int PRIMARY KEY,
@@ -155,17 +155,17 @@ CREATE TABLE "inventory" (
155
155
  "last_update" timestamp
156
156
  );
157
157
 
158
- ALTER TABLE "film_category" ADD FOREIGN KEY ("category_id") REFERENCES "category" ("id") DEFERRABLE INITIALLY IMMEDIATE;
158
+ ALTER TABLE "film_category" ADD FOREIGN KEY ("category_id") REFERENCES "category" ("id");
159
159
 
160
- ALTER TABLE "film_text" ADD FOREIGN KEY ("film_id") REFERENCES "film" ("id") DEFERRABLE INITIALLY IMMEDIATE;
160
+ ALTER TABLE "film_text" ADD FOREIGN KEY ("film_id") REFERENCES "film" ("id");
161
161
 
162
- ALTER TABLE "film" ADD FOREIGN KEY ("language_id") REFERENCES "language" ("id") DEFERRABLE INITIALLY IMMEDIATE;
162
+ ALTER TABLE "film" ADD FOREIGN KEY ("language_id") REFERENCES "language" ("id");
163
163
 
164
- ALTER TABLE "film" ADD FOREIGN KEY ("original_language_id") REFERENCES "language" ("id") DEFERRABLE INITIALLY IMMEDIATE;
164
+ ALTER TABLE "film" ADD FOREIGN KEY ("original_language_id") REFERENCES "language" ("id");
165
165
 
166
- ALTER TABLE "film_actor" ADD FOREIGN KEY ("film_id") REFERENCES "film" ("id") DEFERRABLE INITIALLY IMMEDIATE;
166
+ ALTER TABLE "film_actor" ADD FOREIGN KEY ("film_id") REFERENCES "film" ("id");
167
167
 
168
- ALTER TABLE "film_actor" ADD FOREIGN KEY ("actor_id") REFERENCES "actor" ("id") DEFERRABLE INITIALLY IMMEDIATE;
168
+ ALTER TABLE "film_actor" ADD FOREIGN KEY ("actor_id") REFERENCES "actor" ("id");
169
169
 
170
- ALTER TABLE "inventory" ADD FOREIGN KEY ("film_id") REFERENCES "film" ("id") DEFERRABLE INITIALLY IMMEDIATE;
170
+ ALTER TABLE "inventory" ADD FOREIGN KEY ("film_id") REFERENCES "film" ("id");
171
171
 
@@ -65,20 +65,20 @@ GRANT REFERENCES ON "products" TO PUBLIC;
65
65
 
66
66
  GRANT REFERENCES ON "C##test02"."products" TO PUBLIC;
67
67
 
68
- ALTER TABLE "products" ADD FOREIGN KEY ("user_id") REFERENCES "C##test01"."users" ("id") DEFERRABLE INITIALLY IMMEDIATE;
68
+ ALTER TABLE "products" ADD FOREIGN KEY ("user_id") REFERENCES "C##test01"."users" ("id");
69
69
 
70
- ALTER TABLE "C##test01"."products" ADD FOREIGN KEY ("user_id") REFERENCES "users" ("id") DEFERRABLE INITIALLY IMMEDIATE;
70
+ ALTER TABLE "C##test01"."products" ADD FOREIGN KEY ("user_id") REFERENCES "users" ("id");
71
71
 
72
- ALTER TABLE "C##test01"."products" ADD FOREIGN KEY ("user_id") REFERENCES "C##test01"."users" ("id") DEFERRABLE INITIALLY IMMEDIATE;
72
+ ALTER TABLE "C##test01"."products" ADD FOREIGN KEY ("user_id") REFERENCES "C##test01"."users" ("id");
73
73
 
74
- ALTER TABLE "C##test02"."users_products" ADD FOREIGN KEY ("users_id") REFERENCES "C##test02"."users" ("id") DEFERRABLE INITIALLY IMMEDIATE;
74
+ ALTER TABLE "C##test02"."users_products" ADD FOREIGN KEY ("users_id") REFERENCES "C##test02"."users" ("id");
75
75
 
76
- ALTER TABLE "C##test02"."users_products" ADD FOREIGN KEY ("products_id") REFERENCES "products" ("id") DEFERRABLE INITIALLY IMMEDIATE;
76
+ ALTER TABLE "C##test02"."users_products" ADD FOREIGN KEY ("products_id") REFERENCES "products" ("id");
77
77
 
78
- ALTER TABLE "users_products" ADD FOREIGN KEY ("users_id") REFERENCES "users" ("id") DEFERRABLE INITIALLY IMMEDIATE;
78
+ ALTER TABLE "users_products" ADD FOREIGN KEY ("users_id") REFERENCES "users" ("id");
79
79
 
80
- ALTER TABLE "users_products" ADD FOREIGN KEY ("products_id") REFERENCES "C##test02"."products" ("id") DEFERRABLE INITIALLY IMMEDIATE;
80
+ ALTER TABLE "users_products" ADD FOREIGN KEY ("products_id") REFERENCES "C##test02"."products" ("id");
81
81
 
82
- ALTER TABLE "C##test01"."users_products" ADD FOREIGN KEY ("users_id") REFERENCES "C##test01"."users" ("id") DEFERRABLE INITIALLY IMMEDIATE;
82
+ ALTER TABLE "C##test01"."users_products" ADD FOREIGN KEY ("users_id") REFERENCES "C##test01"."users" ("id");
83
83
 
84
- ALTER TABLE "C##test01"."users_products" ADD FOREIGN KEY ("products_id") REFERENCES "C##test02"."products" ("id") DEFERRABLE INITIALLY IMMEDIATE;
84
+ ALTER TABLE "C##test01"."users_products" ADD FOREIGN KEY ("products_id") REFERENCES "C##test02"."products" ("id");
package/eslint.config.ts CHANGED
@@ -4,7 +4,6 @@ import { defineConfig } from 'eslint/config';
4
4
  import stylistic from '@stylistic/eslint-plugin';
5
5
  import tseslint from 'typescript-eslint';
6
6
  import tsparser from '@typescript-eslint/parser';
7
- import jest from 'eslint-plugin-jest';
8
7
 
9
8
  export default defineConfig(
10
9
  eslint.configs.recommended,
@@ -21,9 +20,8 @@ export default defineConfig(
21
20
  'node_modules/*',
22
21
  'lib/*',
23
22
  'bin/*',
24
- 'jestHelpers.js',
25
23
  'eslint.config.ts',
26
- 'jest.config.ts',
24
+ 'vite.config.ts',
27
25
  ],
28
26
  },
29
27
  {
@@ -38,6 +36,7 @@ export default defineConfig(
38
36
  sourceType: 'module',
39
37
  ecmaVersion: 2018,
40
38
  project: './tsconfig.json',
39
+ tsconfigRootDir: import.meta.dirname,
41
40
  },
42
41
  },
43
42
  plugins: {
@@ -74,11 +73,19 @@ export default defineConfig(
74
73
  },
75
74
  },
76
75
  {
77
- files: ['**/*.test.js', '**/*.spec.js'],
78
- ...jest.configs['flat/recommended'],
76
+ files: ['**/*.test.js', '**/*.spec.js', '**/*.test.ts', '**/*.spec.ts'],
79
77
  languageOptions: {
80
78
  globals: {
81
- ...jest.environments.globals.globals,
79
+ // Vitest globals
80
+ describe: 'readonly',
81
+ it: 'readonly',
82
+ test: 'readonly',
83
+ expect: 'readonly',
84
+ beforeAll: 'readonly',
85
+ afterAll: 'readonly',
86
+ beforeEach: 'readonly',
87
+ afterEach: 'readonly',
88
+ vi: 'readonly',
82
89
  },
83
90
  },
84
91
  rules: {