@dbml/cli 3.2.0 → 3.4.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.
- package/__test__/dbml2sql/filename --mysql --out-file/dbml-error.log +0 -36
- package/__test__/dbml2sql/filename --mysql --out-file/out-files/schema.sql +1 -1
- package/__test__/dbml2sql/filename --oracle --out-file/expect-out-files/schema.sql +57 -0
- package/__test__/dbml2sql/filename --oracle --out-file/in-files/schema.dbml +71 -0
- package/__test__/dbml2sql/filename --oracle --out-file/options.json +8 -0
- package/__test__/dbml2sql/filename --oracle --out-file/stdout.txt +1 -0
- package/__test__/dbml2sql/filename --oracle stdout/in-files/schema.dbml +71 -0
- package/__test__/dbml2sql/filename --oracle stdout/options.json +6 -0
- package/__test__/dbml2sql/filename --oracle stdout/stdout.txt +58 -0
- package/__test__/dbml2sql/filename --out-file/dbml-error.log +0 -36
- package/__test__/dbml2sql/filename --out-file/out-files/schema.sql +1 -1
- package/__test__/dbml2sql/filename --postgres --out-file/dbml-error.log +0 -24
- package/__test__/dbml2sql/filename --postgres --out-file/out-files/schema.sql +1 -1
- package/__test__/dbml2sql/filenames --mysql --out-file/dbml-error.log +0 -24
- package/__test__/dbml2sql/filenames --mysql --out-file/out-files/schema.sql +1 -1
- package/__test__/dbml2sql/filenames --oracle --out-file/expect-out-files/schema.sql +168 -0
- package/__test__/dbml2sql/filenames --oracle --out-file/in-files/business.dbml +40 -0
- package/__test__/dbml2sql/filenames --oracle --out-file/in-files/customer.dbml +39 -0
- package/__test__/dbml2sql/filenames --oracle --out-file/in-files/inventory.dbml +61 -0
- package/__test__/dbml2sql/filenames --oracle --out-file/options.json +10 -0
- package/__test__/dbml2sql/filenames --oracle --out-file/stdout.txt +1 -0
- package/__test__/dbml2sql/filenames --oracle stdout/in-files/business.dbml +40 -0
- package/__test__/dbml2sql/filenames --oracle stdout/in-files/customer.dbml +39 -0
- package/__test__/dbml2sql/filenames --oracle stdout/in-files/inventory.dbml +61 -0
- package/__test__/dbml2sql/filenames --oracle stdout/options.json +8 -0
- package/__test__/dbml2sql/filenames --oracle stdout/stdout.txt +171 -0
- package/__test__/dbml2sql/filenames --out-file/dbml-error.log +0 -24
- package/__test__/dbml2sql/filenames --out-file/out-files/schema.sql +1 -1
- package/__test__/dbml2sql/filenames --postgres --out-file/dbml-error.log +0 -24
- package/__test__/dbml2sql/filenames --postgres --out-file/out-files/schema.sql +1 -1
- package/__test__/dbml2sql/multiple_schema_mssql/dbml-error.log +0 -24
- package/__test__/dbml2sql/multiple_schema_mssql/out-files/multiple_schema.out.sql +1 -1
- package/__test__/dbml2sql/multiple_schema_mysql/dbml-error.log +0 -24
- package/__test__/dbml2sql/multiple_schema_mysql/out-files/multiple_schema.out.sql +1 -1
- package/__test__/dbml2sql/multiple_schema_oracle/expect-out-files/multiple_schema.out.sql +84 -0
- package/__test__/dbml2sql/multiple_schema_oracle/in-files/multiple_schema.in.dbml +45 -0
- package/__test__/dbml2sql/multiple_schema_oracle/options.json +8 -0
- package/__test__/dbml2sql/multiple_schema_oracle/stdout.txt +1 -0
- package/__test__/dbml2sql/multiple_schema_pg/dbml-error.log +0 -24
- package/__test__/dbml2sql/multiple_schema_pg/out-files/multiple_schema.out.sql +1 -1
- package/__test__/dbml2sql/syntax-error/dbml-error.log +1074 -2143
- package/__test__/sql2dbml/filename --mssql --out-file/dbml-error.log +0 -51
- package/__test__/sql2dbml/filename --mysql --out-file/dbml-error.log +0 -24
- package/__test__/sql2dbml/filename --out-file/dbml-error.log +0 -24
- package/__test__/sql2dbml/filename --postgres --out-file/dbml-error.log +0 -24
- package/__test__/sql2dbml/filenames --mysql --out-file/dbml-error.log +0 -239
- package/__test__/sql2dbml/filenames --mysql stdout/dbml-error.log +0 -218
- package/__test__/sql2dbml/filenames --out-file/dbml-error.log +0 -24
- package/__test__/sql2dbml/filenames --postgres --out-file/dbml-error.log +0 -24
- package/__test__/sql2dbml/multiple_schema_mssql/dbml-error.log +0 -121
- package/__test__/sql2dbml/multiple_schema_mysql/dbml-error.log +0 -104
- package/__test__/sql2dbml/multiple_schema_pg/dbml-error.log +32 -163
- package/__test__/sql2dbml/syntax-error/dbml-error.log +1092 -2694
- package/__test__/sql2dbml/syntax-error-duplicate-endpoints --mssql/dbml-error.log +1132 -1929
- package/__test__/sql2dbml/syntax-error-duplicate-endpoints --mysql/dbml-error.log +1127 -1924
- package/bin/dbml2sql.js +0 -0
- package/bin/sql2dbml.js +0 -0
- package/dbml-error.log +258 -322
- package/lib/cli/config.js +3 -0
- package/lib/cli/export.js +2 -1
- package/lib/cli/index.js +1 -1
- package/lib/cli/utils.js +1 -1
- package/package.json +3 -3
- package/src/cli/config.js +3 -0
- package/src/cli/export.js +7 -3
- package/src/cli/index.js +1 -0
- package/src/cli/utils.js +1 -1
- package/yarn-error.log +87 -0
- package/bin/dbml-error.log +0 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
Table country {
|
|
2
|
+
id int [pk]
|
|
3
|
+
country nvarchar2(255)
|
|
4
|
+
last_update timestamp
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
Table city {
|
|
8
|
+
id int [pk]
|
|
9
|
+
city nvarchar2(255)
|
|
10
|
+
country_id int [ref: > country.id]
|
|
11
|
+
last_update timestamp
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
Table address {
|
|
15
|
+
id int [pk]
|
|
16
|
+
address nvarchar2(255)
|
|
17
|
+
address2 nvarchar2(255)
|
|
18
|
+
district nvarchar2(255)
|
|
19
|
+
city_id int [ref: > city.id]
|
|
20
|
+
postal_code nvarchar2(255)
|
|
21
|
+
phone nvarchar2(255)
|
|
22
|
+
last_update timestamp
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
Table customer {
|
|
26
|
+
id int [pk]
|
|
27
|
+
store_id int
|
|
28
|
+
first_name nvarchar2(255)
|
|
29
|
+
last_name nvarchar2(255)
|
|
30
|
+
email nvarchar2(255)
|
|
31
|
+
address_id int [ref: > address.id]
|
|
32
|
+
active number(1)
|
|
33
|
+
create_Date timestamp
|
|
34
|
+
last_update timestamp
|
|
35
|
+
|
|
36
|
+
Indexes {
|
|
37
|
+
(id, first_name) [type: btree, name: "IDX_CUSTOMER"]
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
Table category {
|
|
2
|
+
id int [pk]
|
|
3
|
+
name nvarchar2(255)
|
|
4
|
+
last_update timestamp
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
Table film_category {
|
|
8
|
+
id int [pk]
|
|
9
|
+
category_id int [ref: > category.id]
|
|
10
|
+
last_update timestamp
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
Table language {
|
|
14
|
+
id int [pk]
|
|
15
|
+
name nvarchar2(255)
|
|
16
|
+
last_update timestamp
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
Table film_text {
|
|
20
|
+
id int [pk]
|
|
21
|
+
film_id int [ref: > film.id]
|
|
22
|
+
title nvarchar2(255)
|
|
23
|
+
description nclob
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
Table actor {
|
|
27
|
+
id int [pk]
|
|
28
|
+
first_name nvarchar2(255)
|
|
29
|
+
last_name nvarchar2(255)
|
|
30
|
+
last_update timestamp
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
Table film {
|
|
34
|
+
id int [pk]
|
|
35
|
+
title nvarchar2(255)
|
|
36
|
+
description nclob
|
|
37
|
+
releaase_year int
|
|
38
|
+
language_id int [ref: > language.id]
|
|
39
|
+
original_language_id int [ref: > language.id]
|
|
40
|
+
rental_duration int
|
|
41
|
+
rental_rate float
|
|
42
|
+
length int
|
|
43
|
+
replacement_cost float
|
|
44
|
+
rating nvarchar2(255)
|
|
45
|
+
special_feature nvarchar2(255)
|
|
46
|
+
last_update timestamp
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
Table film_actor {
|
|
50
|
+
id int [pk]
|
|
51
|
+
film_id int [ref: > film.id]
|
|
52
|
+
actor_id int [ref: > actor.id]
|
|
53
|
+
last_update timestamp
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
Table inventory {
|
|
57
|
+
id int [pk]
|
|
58
|
+
film_id int [ref: > film.id]
|
|
59
|
+
store_id int
|
|
60
|
+
last_update timestamp
|
|
61
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
✔ Generated SQL dump file (Oracle): schema.sql
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
Table staff {
|
|
2
|
+
id int [pk]
|
|
3
|
+
first_name nvarchar2(255)
|
|
4
|
+
last_name nvarchar2(255)
|
|
5
|
+
address_id int
|
|
6
|
+
picture blob
|
|
7
|
+
email nvarchar2(255)
|
|
8
|
+
store_id int [ref: > store.id]
|
|
9
|
+
active number(1)
|
|
10
|
+
user_name nvarchar2(255)
|
|
11
|
+
password nvarchar2(255)
|
|
12
|
+
last_update timestamp
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
Table store {
|
|
16
|
+
id int [pk]
|
|
17
|
+
manager_staff_id int [ref: > staff.id]
|
|
18
|
+
address_id int
|
|
19
|
+
last_update timestamp
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
table payment {
|
|
23
|
+
id int [pk]
|
|
24
|
+
customer_id int
|
|
25
|
+
staff_id int [ref: > staff.id]
|
|
26
|
+
rental_id int [ref: > rental.id]
|
|
27
|
+
amount float
|
|
28
|
+
payment_date date
|
|
29
|
+
last_update timestamp
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
Table rental {
|
|
33
|
+
id int [pk]
|
|
34
|
+
rental_date date
|
|
35
|
+
inventory_id int
|
|
36
|
+
customer_id int
|
|
37
|
+
return_date date
|
|
38
|
+
staff_id int [ref: > staff.id]
|
|
39
|
+
last_update timestamp
|
|
40
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
Table country {
|
|
2
|
+
id int [pk]
|
|
3
|
+
country nvarchar2(255)
|
|
4
|
+
last_update timestamp
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
Table city {
|
|
8
|
+
id int [pk]
|
|
9
|
+
city nvarchar2(255)
|
|
10
|
+
country_id int [ref: > country.id]
|
|
11
|
+
last_update timestamp
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
Table address {
|
|
15
|
+
id int [pk]
|
|
16
|
+
address nvarchar2(255)
|
|
17
|
+
address2 nvarchar2(255)
|
|
18
|
+
district nvarchar2(255)
|
|
19
|
+
city_id int [ref: > city.id]
|
|
20
|
+
postal_code nvarchar2(255)
|
|
21
|
+
phone nvarchar2(255)
|
|
22
|
+
last_update timestamp
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
Table customer {
|
|
26
|
+
id int [pk]
|
|
27
|
+
store_id int
|
|
28
|
+
first_name nvarchar2(255)
|
|
29
|
+
last_name nvarchar2(255)
|
|
30
|
+
email nvarchar2(255)
|
|
31
|
+
address_id int [ref: > address.id]
|
|
32
|
+
active number(1)
|
|
33
|
+
create_Date timestamp
|
|
34
|
+
last_update timestamp
|
|
35
|
+
|
|
36
|
+
Indexes {
|
|
37
|
+
(id, first_name) [type: btree, name: "IDX_CUSTOMER"]
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
Table category {
|
|
2
|
+
id int [pk]
|
|
3
|
+
name nvarchar2(255)
|
|
4
|
+
last_update timestamp
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
Table film_category {
|
|
8
|
+
id int [pk]
|
|
9
|
+
category_id int [ref: > category.id]
|
|
10
|
+
last_update timestamp
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
Table language {
|
|
14
|
+
id int [pk]
|
|
15
|
+
name nvarchar2(255)
|
|
16
|
+
last_update timestamp
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
Table film_text {
|
|
20
|
+
id int [pk]
|
|
21
|
+
film_id int [ref: > film.id]
|
|
22
|
+
title nvarchar2(255)
|
|
23
|
+
description nclob
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
Table actor {
|
|
27
|
+
id int [pk]
|
|
28
|
+
first_name nvarchar2(255)
|
|
29
|
+
last_name nvarchar2(255)
|
|
30
|
+
last_update timestamp
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
Table film {
|
|
34
|
+
id int [pk]
|
|
35
|
+
title nvarchar2(255)
|
|
36
|
+
description nclob
|
|
37
|
+
releaase_year int
|
|
38
|
+
language_id int [ref: > language.id]
|
|
39
|
+
original_language_id int [ref: > language.id]
|
|
40
|
+
rental_duration int
|
|
41
|
+
rental_rate float
|
|
42
|
+
length int
|
|
43
|
+
replacement_cost float
|
|
44
|
+
rating nvarchar2(255)
|
|
45
|
+
special_feature nvarchar2(255)
|
|
46
|
+
last_update timestamp
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
Table film_actor {
|
|
50
|
+
id int [pk]
|
|
51
|
+
film_id int [ref: > film.id]
|
|
52
|
+
actor_id int [ref: > actor.id]
|
|
53
|
+
last_update timestamp
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
Table inventory {
|
|
57
|
+
id int [pk]
|
|
58
|
+
film_id int [ref: > film.id]
|
|
59
|
+
store_id int
|
|
60
|
+
last_update timestamp
|
|
61
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
CREATE TABLE "staff" (
|
|
2
|
+
"id" int PRIMARY KEY,
|
|
3
|
+
"first_name" nvarchar2(255),
|
|
4
|
+
"last_name" nvarchar2(255),
|
|
5
|
+
"address_id" int,
|
|
6
|
+
"picture" blob,
|
|
7
|
+
"email" nvarchar2(255),
|
|
8
|
+
"store_id" int,
|
|
9
|
+
"active" number(1),
|
|
10
|
+
"user_name" nvarchar2(255),
|
|
11
|
+
"password" nvarchar2(255),
|
|
12
|
+
"last_update" timestamp
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
CREATE TABLE "store" (
|
|
16
|
+
"id" int PRIMARY KEY,
|
|
17
|
+
"manager_staff_id" int,
|
|
18
|
+
"address_id" int,
|
|
19
|
+
"last_update" timestamp
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
CREATE TABLE "payment" (
|
|
23
|
+
"id" int PRIMARY KEY,
|
|
24
|
+
"customer_id" int,
|
|
25
|
+
"staff_id" int,
|
|
26
|
+
"rental_id" int,
|
|
27
|
+
"amount" float,
|
|
28
|
+
"payment_date" date,
|
|
29
|
+
"last_update" timestamp
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
CREATE TABLE "rental" (
|
|
33
|
+
"id" int PRIMARY KEY,
|
|
34
|
+
"rental_date" date,
|
|
35
|
+
"inventory_id" int,
|
|
36
|
+
"customer_id" int,
|
|
37
|
+
"return_date" date,
|
|
38
|
+
"staff_id" int,
|
|
39
|
+
"last_update" timestamp
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
ALTER TABLE "staff" ADD FOREIGN KEY ("store_id") REFERENCES "store" ("id");
|
|
43
|
+
|
|
44
|
+
ALTER TABLE "store" ADD FOREIGN KEY ("manager_staff_id") REFERENCES "staff" ("id");
|
|
45
|
+
|
|
46
|
+
ALTER TABLE "payment" ADD FOREIGN KEY ("staff_id") REFERENCES "staff" ("id");
|
|
47
|
+
|
|
48
|
+
ALTER TABLE "payment" ADD FOREIGN KEY ("rental_id") REFERENCES "rental" ("id");
|
|
49
|
+
|
|
50
|
+
ALTER TABLE "rental" ADD FOREIGN KEY ("staff_id") REFERENCES "staff" ("id");
|
|
51
|
+
|
|
52
|
+
CREATE TABLE "country" (
|
|
53
|
+
"id" int PRIMARY KEY,
|
|
54
|
+
"country" nvarchar2(255),
|
|
55
|
+
"last_update" timestamp
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
CREATE TABLE "city" (
|
|
59
|
+
"id" int PRIMARY KEY,
|
|
60
|
+
"city" nvarchar2(255),
|
|
61
|
+
"country_id" int,
|
|
62
|
+
"last_update" timestamp
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
CREATE TABLE "address" (
|
|
66
|
+
"id" int PRIMARY KEY,
|
|
67
|
+
"address" nvarchar2(255),
|
|
68
|
+
"address2" nvarchar2(255),
|
|
69
|
+
"district" nvarchar2(255),
|
|
70
|
+
"city_id" int,
|
|
71
|
+
"postal_code" nvarchar2(255),
|
|
72
|
+
"phone" nvarchar2(255),
|
|
73
|
+
"last_update" timestamp
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
CREATE TABLE "customer" (
|
|
77
|
+
"id" int PRIMARY KEY,
|
|
78
|
+
"store_id" int,
|
|
79
|
+
"first_name" nvarchar2(255),
|
|
80
|
+
"last_name" nvarchar2(255),
|
|
81
|
+
"email" nvarchar2(255),
|
|
82
|
+
"address_id" int,
|
|
83
|
+
"active" number(1),
|
|
84
|
+
"create_Date" timestamp,
|
|
85
|
+
"last_update" timestamp
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
CREATE INDEX "IDX_CUSTOMER" ON "customer" ("id", "first_name");
|
|
89
|
+
|
|
90
|
+
ALTER TABLE "city" ADD FOREIGN KEY ("country_id") REFERENCES "country" ("id");
|
|
91
|
+
|
|
92
|
+
ALTER TABLE "address" ADD FOREIGN KEY ("city_id") REFERENCES "city" ("id");
|
|
93
|
+
|
|
94
|
+
ALTER TABLE "customer" ADD FOREIGN KEY ("address_id") REFERENCES "address" ("id");
|
|
95
|
+
|
|
96
|
+
CREATE TABLE "category" (
|
|
97
|
+
"id" int PRIMARY KEY,
|
|
98
|
+
"name" nvarchar2(255),
|
|
99
|
+
"last_update" timestamp
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
CREATE TABLE "film_category" (
|
|
103
|
+
"id" int PRIMARY KEY,
|
|
104
|
+
"category_id" int,
|
|
105
|
+
"last_update" timestamp
|
|
106
|
+
);
|
|
107
|
+
|
|
108
|
+
CREATE TABLE "language" (
|
|
109
|
+
"id" int PRIMARY KEY,
|
|
110
|
+
"name" nvarchar2(255),
|
|
111
|
+
"last_update" timestamp
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
CREATE TABLE "film_text" (
|
|
115
|
+
"id" int PRIMARY KEY,
|
|
116
|
+
"film_id" int,
|
|
117
|
+
"title" nvarchar2(255),
|
|
118
|
+
"description" nclob
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
CREATE TABLE "actor" (
|
|
122
|
+
"id" int PRIMARY KEY,
|
|
123
|
+
"first_name" nvarchar2(255),
|
|
124
|
+
"last_name" nvarchar2(255),
|
|
125
|
+
"last_update" timestamp
|
|
126
|
+
);
|
|
127
|
+
|
|
128
|
+
CREATE TABLE "film" (
|
|
129
|
+
"id" int PRIMARY KEY,
|
|
130
|
+
"title" nvarchar2(255),
|
|
131
|
+
"description" nclob,
|
|
132
|
+
"releaase_year" int,
|
|
133
|
+
"language_id" int,
|
|
134
|
+
"original_language_id" int,
|
|
135
|
+
"rental_duration" int,
|
|
136
|
+
"rental_rate" float,
|
|
137
|
+
"length" int,
|
|
138
|
+
"replacement_cost" float,
|
|
139
|
+
"rating" nvarchar2(255),
|
|
140
|
+
"special_feature" nvarchar2(255),
|
|
141
|
+
"last_update" timestamp
|
|
142
|
+
);
|
|
143
|
+
|
|
144
|
+
CREATE TABLE "film_actor" (
|
|
145
|
+
"id" int PRIMARY KEY,
|
|
146
|
+
"film_id" int,
|
|
147
|
+
"actor_id" int,
|
|
148
|
+
"last_update" timestamp
|
|
149
|
+
);
|
|
150
|
+
|
|
151
|
+
CREATE TABLE "inventory" (
|
|
152
|
+
"id" int PRIMARY KEY,
|
|
153
|
+
"film_id" int,
|
|
154
|
+
"store_id" int,
|
|
155
|
+
"last_update" timestamp
|
|
156
|
+
);
|
|
157
|
+
|
|
158
|
+
ALTER TABLE "film_category" ADD FOREIGN KEY ("category_id") REFERENCES "category" ("id");
|
|
159
|
+
|
|
160
|
+
ALTER TABLE "film_text" ADD FOREIGN KEY ("film_id") REFERENCES "film" ("id");
|
|
161
|
+
|
|
162
|
+
ALTER TABLE "film" ADD FOREIGN KEY ("language_id") REFERENCES "language" ("id");
|
|
163
|
+
|
|
164
|
+
ALTER TABLE "film" ADD FOREIGN KEY ("original_language_id") REFERENCES "language" ("id");
|
|
165
|
+
|
|
166
|
+
ALTER TABLE "film_actor" ADD FOREIGN KEY ("film_id") REFERENCES "film" ("id");
|
|
167
|
+
|
|
168
|
+
ALTER TABLE "film_actor" ADD FOREIGN KEY ("actor_id") REFERENCES "actor" ("id");
|
|
169
|
+
|
|
170
|
+
ALTER TABLE "inventory" ADD FOREIGN KEY ("film_id") REFERENCES "film" ("id");
|
|
171
|
+
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
2021-07-13T12:37:50.404Z
|
|
2
|
-
TypeError: Cannot read property 'tick' of undefined
|
|
3
|
-
at exportHandler (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\export.js:37:56)
|
|
4
|
-
at dbml2sql (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\index.js:19:3)
|
|
5
|
-
at Object.<anonymous> (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\__test__\dbml2sql_bin.js:5:1)
|
|
6
|
-
at Module._compile (internal/modules/cjs/loader.js:1085:14)
|
|
7
|
-
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
|
|
8
|
-
at Module.load (internal/modules/cjs/loader.js:950:32)
|
|
9
|
-
at Function.Module._load (internal/modules/cjs/loader.js:790:14)
|
|
10
|
-
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
|
|
11
|
-
at internal/main/run_main_module.js:17:47
|
|
12
|
-
|
|
13
|
-
2021-07-13T12:58:29.075Z
|
|
14
|
-
TypeError: Cannot read property 'tick' of undefined
|
|
15
|
-
at exportHandler (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\export.js:37:49)
|
|
16
|
-
at dbml2sql (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\index.js:19:3)
|
|
17
|
-
at Object.<anonymous> (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\__test__\dbml2sql_bin.js:5:1)
|
|
18
|
-
at Module._compile (internal/modules/cjs/loader.js:1085:14)
|
|
19
|
-
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
|
|
20
|
-
at Module.load (internal/modules/cjs/loader.js:950:32)
|
|
21
|
-
at Function.Module._load (internal/modules/cjs/loader.js:790:14)
|
|
22
|
-
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
|
|
23
|
-
at internal/main/run_main_module.js:17:47
|
|
24
|
-
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
2021-07-13T12:37:51.477Z
|
|
2
|
-
TypeError: Cannot read property 'tick' of undefined
|
|
3
|
-
at exportHandler (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\export.js:37:56)
|
|
4
|
-
at dbml2sql (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\index.js:19:3)
|
|
5
|
-
at Object.<anonymous> (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\__test__\dbml2sql_bin.js:5:1)
|
|
6
|
-
at Module._compile (internal/modules/cjs/loader.js:1085:14)
|
|
7
|
-
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
|
|
8
|
-
at Module.load (internal/modules/cjs/loader.js:950:32)
|
|
9
|
-
at Function.Module._load (internal/modules/cjs/loader.js:790:14)
|
|
10
|
-
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
|
|
11
|
-
at internal/main/run_main_module.js:17:47
|
|
12
|
-
|
|
13
|
-
2021-07-13T12:58:30.073Z
|
|
14
|
-
TypeError: Cannot read property 'tick' of undefined
|
|
15
|
-
at exportHandler (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\export.js:37:49)
|
|
16
|
-
at dbml2sql (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\index.js:19:3)
|
|
17
|
-
at Object.<anonymous> (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\__test__\dbml2sql_bin.js:5:1)
|
|
18
|
-
at Module._compile (internal/modules/cjs/loader.js:1085:14)
|
|
19
|
-
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
|
|
20
|
-
at Module.load (internal/modules/cjs/loader.js:950:32)
|
|
21
|
-
at Function.Module._load (internal/modules/cjs/loader.js:790:14)
|
|
22
|
-
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
|
|
23
|
-
at internal/main/run_main_module.js:17:47
|
|
24
|
-
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
2021-07-13T12:37:44.406Z
|
|
2
|
-
TypeError: Cannot read property 'tick' of undefined
|
|
3
|
-
at exportHandler (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\export.js:37:56)
|
|
4
|
-
at dbml2sql (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\index.js:19:3)
|
|
5
|
-
at Object.<anonymous> (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\__test__\dbml2sql_bin.js:5:1)
|
|
6
|
-
at Module._compile (internal/modules/cjs/loader.js:1085:14)
|
|
7
|
-
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
|
|
8
|
-
at Module.load (internal/modules/cjs/loader.js:950:32)
|
|
9
|
-
at Function.Module._load (internal/modules/cjs/loader.js:790:14)
|
|
10
|
-
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
|
|
11
|
-
at internal/main/run_main_module.js:17:47
|
|
12
|
-
|
|
13
|
-
2021-07-13T12:58:23.999Z
|
|
14
|
-
TypeError: Cannot read property 'tick' of undefined
|
|
15
|
-
at exportHandler (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\export.js:37:49)
|
|
16
|
-
at dbml2sql (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\index.js:19:3)
|
|
17
|
-
at Object.<anonymous> (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\__test__\dbml2sql_bin.js:5:1)
|
|
18
|
-
at Module._compile (internal/modules/cjs/loader.js:1085:14)
|
|
19
|
-
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
|
|
20
|
-
at Module.load (internal/modules/cjs/loader.js:950:32)
|
|
21
|
-
at Function.Module._load (internal/modules/cjs/loader.js:790:14)
|
|
22
|
-
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
|
|
23
|
-
at internal/main/run_main_module.js:17:47
|
|
24
|
-
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
2021-07-13T12:37:44.406Z
|
|
2
|
-
TypeError: Cannot read property 'tick' of undefined
|
|
3
|
-
at exportHandler (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\export.js:37:56)
|
|
4
|
-
at dbml2sql (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\index.js:19:3)
|
|
5
|
-
at Object.<anonymous> (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\__test__\dbml2sql_bin.js:5:1)
|
|
6
|
-
at Module._compile (internal/modules/cjs/loader.js:1085:14)
|
|
7
|
-
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
|
|
8
|
-
at Module.load (internal/modules/cjs/loader.js:950:32)
|
|
9
|
-
at Function.Module._load (internal/modules/cjs/loader.js:790:14)
|
|
10
|
-
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
|
|
11
|
-
at internal/main/run_main_module.js:17:47
|
|
12
|
-
|
|
13
|
-
2021-07-13T12:58:23.999Z
|
|
14
|
-
TypeError: Cannot read property 'tick' of undefined
|
|
15
|
-
at exportHandler (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\export.js:37:49)
|
|
16
|
-
at dbml2sql (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\index.js:19:3)
|
|
17
|
-
at Object.<anonymous> (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\__test__\dbml2sql_bin.js:5:1)
|
|
18
|
-
at Module._compile (internal/modules/cjs/loader.js:1085:14)
|
|
19
|
-
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
|
|
20
|
-
at Module.load (internal/modules/cjs/loader.js:950:32)
|
|
21
|
-
at Function.Module._load (internal/modules/cjs/loader.js:790:14)
|
|
22
|
-
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
|
|
23
|
-
at internal/main/run_main_module.js:17:47
|
|
24
|
-
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
CREATE USER "C##test01"
|
|
2
|
+
NO AUTHENTICATION
|
|
3
|
+
DEFAULT TABLESPACE system
|
|
4
|
+
TEMPORARY TABLESPACE temp
|
|
5
|
+
QUOTA UNLIMITED ON system;
|
|
6
|
+
|
|
7
|
+
CREATE USER "C##test02"
|
|
8
|
+
NO AUTHENTICATION
|
|
9
|
+
DEFAULT TABLESPACE system
|
|
10
|
+
TEMPORARY TABLESPACE temp
|
|
11
|
+
QUOTA UNLIMITED ON system;
|
|
12
|
+
|
|
13
|
+
CREATE TABLE "users" (
|
|
14
|
+
"id" int PRIMARY KEY
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
CREATE TABLE "products" (
|
|
18
|
+
"id" int PRIMARY KEY,
|
|
19
|
+
"user_id" int NOT NULL
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
CREATE TABLE "C##test02"."users_products" (
|
|
23
|
+
"users_id" int,
|
|
24
|
+
"products_id" int,
|
|
25
|
+
PRIMARY KEY ("users_id", "products_id")
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
CREATE TABLE "users_products" (
|
|
29
|
+
"users_id" int,
|
|
30
|
+
"products_id" int,
|
|
31
|
+
PRIMARY KEY ("users_id", "products_id")
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
CREATE TABLE "C##test01"."users_products" (
|
|
35
|
+
"users_id" int,
|
|
36
|
+
"products_id" int,
|
|
37
|
+
PRIMARY KEY ("users_id", "products_id")
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
CREATE TABLE "C##test01"."users" (
|
|
41
|
+
"id" int PRIMARY KEY
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
CREATE TABLE "C##test01"."products" (
|
|
45
|
+
"id" int PRIMARY KEY,
|
|
46
|
+
"user_id" int NOT NULL
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
CREATE TABLE "C##test02"."users" (
|
|
50
|
+
"id" int PRIMARY KEY
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
CREATE TABLE "C##test02"."products" (
|
|
54
|
+
"id" int PRIMARY KEY,
|
|
55
|
+
"user_id" int NOT NULL
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
GRANT REFERENCES ON "C##test01"."users" TO PUBLIC;
|
|
59
|
+
|
|
60
|
+
GRANT REFERENCES ON "users" TO PUBLIC;
|
|
61
|
+
|
|
62
|
+
GRANT REFERENCES ON "C##test02"."users" TO PUBLIC;
|
|
63
|
+
|
|
64
|
+
GRANT REFERENCES ON "products" TO PUBLIC;
|
|
65
|
+
|
|
66
|
+
GRANT REFERENCES ON "C##test02"."products" TO PUBLIC;
|
|
67
|
+
|
|
68
|
+
ALTER TABLE "products" ADD FOREIGN KEY ("user_id") REFERENCES "C##test01"."users" ("id");
|
|
69
|
+
|
|
70
|
+
ALTER TABLE "C##test01"."products" ADD FOREIGN KEY ("user_id") REFERENCES "users" ("id");
|
|
71
|
+
|
|
72
|
+
ALTER TABLE "C##test01"."products" ADD FOREIGN KEY ("user_id") REFERENCES "C##test01"."users" ("id");
|
|
73
|
+
|
|
74
|
+
ALTER TABLE "C##test02"."users_products" ADD FOREIGN KEY ("users_id") REFERENCES "C##test02"."users" ("id");
|
|
75
|
+
|
|
76
|
+
ALTER TABLE "C##test02"."users_products" ADD FOREIGN KEY ("products_id") REFERENCES "products" ("id");
|
|
77
|
+
|
|
78
|
+
ALTER TABLE "users_products" ADD FOREIGN KEY ("users_id") REFERENCES "users" ("id");
|
|
79
|
+
|
|
80
|
+
ALTER TABLE "users_products" ADD FOREIGN KEY ("products_id") REFERENCES "C##test02"."products" ("id");
|
|
81
|
+
|
|
82
|
+
ALTER TABLE "C##test01"."users_products" ADD FOREIGN KEY ("users_id") REFERENCES "C##test01"."users" ("id");
|
|
83
|
+
|
|
84
|
+
ALTER TABLE "C##test01"."users_products" ADD FOREIGN KEY ("products_id") REFERENCES "C##test02"."products" ("id");
|