@soddong/agentic-domain-artifact-standard 0.11.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/.tbls.yml +54 -0
- package/CHANGELOG.md +94 -0
- package/README.md +386 -0
- package/dist/database.d.ts +8 -0
- package/dist/database.d.ts.map +1 -0
- package/dist/database.js +76 -0
- package/dist/database.js.map +1 -0
- package/dist/fixtures.d.ts +11 -0
- package/dist/fixtures.d.ts.map +1 -0
- package/dist/fixtures.js +537 -0
- package/dist/fixtures.js.map +1 -0
- package/dist/index.d.ts +72 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +213 -0
- package/dist/index.js.map +1 -0
- package/dist/repositories.d.ts +46 -0
- package/dist/repositories.d.ts.map +1 -0
- package/dist/repositories.js +730 -0
- package/dist/repositories.js.map +1 -0
- package/dist/seed-apply.d.ts +20 -0
- package/dist/seed-apply.d.ts.map +1 -0
- package/dist/seed-apply.js +198 -0
- package/dist/seed-apply.js.map +1 -0
- package/dist/service.d.ts +40 -0
- package/dist/service.d.ts.map +1 -0
- package/dist/service.js +105 -0
- package/dist/service.js.map +1 -0
- package/dist/types.d.ts +499 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/docs/build.md +27 -0
- package/docs/configuration.md +5 -0
- package/docs/delivery.md +26 -0
- package/docs/operations.md +28 -0
- package/docs/publishing.md +43 -0
- package/docs/schema/generated/README.md +38 -0
- package/docs/schema/generated/artifact_standard_blueprint_nodes.md +137 -0
- package/docs/schema/generated/artifact_standard_blueprint_nodes.svg +88 -0
- package/docs/schema/generated/artifact_standard_code_groups.md +70 -0
- package/docs/schema/generated/artifact_standard_code_groups.svg +49 -0
- package/docs/schema/generated/artifact_standard_codes.md +88 -0
- package/docs/schema/generated/artifact_standard_codes.svg +49 -0
- package/docs/schema/generated/artifact_standard_component_bindings.md +118 -0
- package/docs/schema/generated/artifact_standard_component_bindings.svg +73 -0
- package/docs/schema/generated/artifact_standard_components.md +114 -0
- package/docs/schema/generated/artifact_standard_components.svg +73 -0
- package/docs/schema/generated/artifact_standard_diagram_policies.md +99 -0
- package/docs/schema/generated/artifact_standard_diagram_policies.svg +49 -0
- package/docs/schema/generated/artifact_standard_document_blueprints.md +101 -0
- package/docs/schema/generated/artifact_standard_document_blueprints.svg +128 -0
- package/docs/schema/generated/artifact_standard_document_component_relations.md +118 -0
- package/docs/schema/generated/artifact_standard_document_component_relations.svg +87 -0
- package/docs/schema/generated/artifact_standard_document_components.md +148 -0
- package/docs/schema/generated/artifact_standard_document_components.svg +139 -0
- package/docs/schema/generated/artifact_standard_figure_policies.md +99 -0
- package/docs/schema/generated/artifact_standard_figure_policies.svg +49 -0
- package/docs/schema/generated/artifact_standard_generated_output_links.md +144 -0
- package/docs/schema/generated/artifact_standard_generated_output_links.svg +57 -0
- package/docs/schema/generated/artifact_standard_physical_structure_policies.md +124 -0
- package/docs/schema/generated/artifact_standard_physical_structure_policies.svg +78 -0
- package/docs/schema/generated/artifact_standard_schema_migrations.md +52 -0
- package/docs/schema/generated/artifact_standard_schema_migrations.svg +27 -0
- package/docs/schema/generated/artifact_standard_source_mappings.md +120 -0
- package/docs/schema/generated/artifact_standard_source_mappings.svg +49 -0
- package/docs/schema/generated/artifact_standard_standards.md +102 -0
- package/docs/schema/generated/artifact_standard_standards.svg +313 -0
- package/docs/schema/generated/artifact_standard_table_column_schemas.md +147 -0
- package/docs/schema/generated/artifact_standard_table_column_schemas.svg +52 -0
- package/docs/schema/generated/artifact_standard_table_schemas.md +99 -0
- package/docs/schema/generated/artifact_standard_table_schemas.svg +71 -0
- package/docs/schema/generated/artifact_standard_template_slots.md +143 -0
- package/docs/schema/generated/artifact_standard_template_slots.svg +88 -0
- package/docs/schema/generated/artifact_standard_validation_rule_set_rules.md +128 -0
- package/docs/schema/generated/artifact_standard_validation_rule_set_rules.svg +52 -0
- package/docs/schema/generated/artifact_standard_validation_rule_sets.md +91 -0
- package/docs/schema/generated/artifact_standard_validation_rule_sets.svg +71 -0
- package/docs/schema/generated/schema.json +4230 -0
- package/docs/schema/generated/schema.mmd +327 -0
- package/docs/schema/generated/schema.svg +510 -0
- package/docs/usage.md +197 -0
- package/package.json +30 -0
- package/src/database/migrations/0001_artifact_standard_base.sql +1295 -0
|
@@ -0,0 +1,4230 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agentic-domain-artifact-standard",
|
|
3
|
+
"desc": "Agentic Platform artifact standard domain database.",
|
|
4
|
+
"tables": [
|
|
5
|
+
{
|
|
6
|
+
"name": "artifact_standard_schema_migrations",
|
|
7
|
+
"type": "table",
|
|
8
|
+
"comment": "artifact-standard 패키지의 migration 적용 이력을 관리한다.",
|
|
9
|
+
"columns": [
|
|
10
|
+
{
|
|
11
|
+
"name": "migration_id",
|
|
12
|
+
"type": "VARCHAR(128)",
|
|
13
|
+
"nullable": true
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "migration_name",
|
|
17
|
+
"type": "VARCHAR(256)",
|
|
18
|
+
"nullable": false
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "applied_at",
|
|
22
|
+
"type": "DATETIME",
|
|
23
|
+
"nullable": false,
|
|
24
|
+
"default": "CURRENT_TIMESTAMP"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"indexes": [
|
|
28
|
+
{
|
|
29
|
+
"name": "sqlite_autoindex_artifact_standard_schema_migrations_1",
|
|
30
|
+
"def": "PRIMARY KEY (migration_id)",
|
|
31
|
+
"table": "artifact_standard_schema_migrations",
|
|
32
|
+
"columns": [
|
|
33
|
+
"migration_id"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"constraints": [
|
|
38
|
+
{
|
|
39
|
+
"name": "migration_id",
|
|
40
|
+
"type": "PRIMARY KEY",
|
|
41
|
+
"def": "PRIMARY KEY (migration_id)",
|
|
42
|
+
"table": "artifact_standard_schema_migrations",
|
|
43
|
+
"columns": [
|
|
44
|
+
"migration_id"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "sqlite_autoindex_artifact_standard_schema_migrations_1",
|
|
49
|
+
"type": "PRIMARY KEY",
|
|
50
|
+
"def": "PRIMARY KEY (migration_id)",
|
|
51
|
+
"table": "artifact_standard_schema_migrations",
|
|
52
|
+
"columns": [
|
|
53
|
+
"migration_id"
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"def": "CREATE TABLE artifact_standard_schema_migrations (\n -- migration 식별자\n migration_id VARCHAR(128) PRIMARY KEY,\n\n -- migration 이름\n migration_name VARCHAR(256) NOT NULL,\n\n -- 적용 시각\n applied_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP\n)"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "artifact_standard_code_groups",
|
|
61
|
+
"type": "table",
|
|
62
|
+
"comment": "코드 그룹을 정의한다.",
|
|
63
|
+
"columns": [
|
|
64
|
+
{
|
|
65
|
+
"name": "code_group_code",
|
|
66
|
+
"type": "VARCHAR(64)",
|
|
67
|
+
"nullable": true
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"name": "code_group_name",
|
|
71
|
+
"type": "VARCHAR(128)",
|
|
72
|
+
"nullable": false
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "description",
|
|
76
|
+
"type": "TEXT",
|
|
77
|
+
"nullable": true
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "sort_order",
|
|
81
|
+
"type": "INTEGER",
|
|
82
|
+
"nullable": false,
|
|
83
|
+
"default": "0"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "is_active",
|
|
87
|
+
"type": "INTEGER",
|
|
88
|
+
"nullable": false,
|
|
89
|
+
"default": "1"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "created_at",
|
|
93
|
+
"type": "DATETIME",
|
|
94
|
+
"nullable": false,
|
|
95
|
+
"default": "CURRENT_TIMESTAMP"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"name": "updated_at",
|
|
99
|
+
"type": "DATETIME",
|
|
100
|
+
"nullable": false,
|
|
101
|
+
"default": "CURRENT_TIMESTAMP"
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
"indexes": [
|
|
105
|
+
{
|
|
106
|
+
"name": "sqlite_autoindex_artifact_standard_code_groups_1",
|
|
107
|
+
"def": "PRIMARY KEY (code_group_code)",
|
|
108
|
+
"table": "artifact_standard_code_groups",
|
|
109
|
+
"columns": [
|
|
110
|
+
"code_group_code"
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"constraints": [
|
|
115
|
+
{
|
|
116
|
+
"name": "code_group_code",
|
|
117
|
+
"type": "PRIMARY KEY",
|
|
118
|
+
"def": "PRIMARY KEY (code_group_code)",
|
|
119
|
+
"table": "artifact_standard_code_groups",
|
|
120
|
+
"columns": [
|
|
121
|
+
"code_group_code"
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"name": "sqlite_autoindex_artifact_standard_code_groups_1",
|
|
126
|
+
"type": "PRIMARY KEY",
|
|
127
|
+
"def": "PRIMARY KEY (code_group_code)",
|
|
128
|
+
"table": "artifact_standard_code_groups",
|
|
129
|
+
"columns": [
|
|
130
|
+
"code_group_code"
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"name": "-",
|
|
135
|
+
"type": "CHECK",
|
|
136
|
+
"def": "CHECK (is_active IN (0, 1))",
|
|
137
|
+
"table": "artifact_standard_code_groups",
|
|
138
|
+
"columns": [
|
|
139
|
+
"is_active"
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"def": "CREATE TABLE artifact_standard_code_groups (\n -- 코드 그룹 식별자\n code_group_code VARCHAR(64) PRIMARY KEY,\n\n -- 코드 그룹 한글명\n code_group_name VARCHAR(128) NOT NULL,\n\n -- 코드 그룹 설명\n description TEXT,\n\n -- 표시 정렬 순서\n sort_order INTEGER NOT NULL DEFAULT 0,\n\n -- 활성 여부. 1은 활성, 0은 비활성\n is_active INTEGER NOT NULL DEFAULT 1\n CHECK (is_active IN (0, 1)),\n\n -- 생성 시각\n created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 수정 시각\n updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP\n)"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"name": "artifact_standard_codes",
|
|
147
|
+
"type": "table",
|
|
148
|
+
"comment": "코드 그룹별 코드 값을 정의한다.",
|
|
149
|
+
"columns": [
|
|
150
|
+
{
|
|
151
|
+
"name": "code_group_code",
|
|
152
|
+
"type": "VARCHAR(64)",
|
|
153
|
+
"nullable": false
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": "code",
|
|
157
|
+
"type": "VARCHAR(128)",
|
|
158
|
+
"nullable": false
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"name": "code_name",
|
|
162
|
+
"type": "VARCHAR(128)",
|
|
163
|
+
"nullable": false
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"name": "description",
|
|
167
|
+
"type": "TEXT",
|
|
168
|
+
"nullable": true
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"name": "sort_order",
|
|
172
|
+
"type": "INTEGER",
|
|
173
|
+
"nullable": false,
|
|
174
|
+
"default": "0"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": "is_active",
|
|
178
|
+
"type": "INTEGER",
|
|
179
|
+
"nullable": false,
|
|
180
|
+
"default": "1"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"name": "metadata_json",
|
|
184
|
+
"type": "JSON",
|
|
185
|
+
"nullable": true
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"name": "created_at",
|
|
189
|
+
"type": "DATETIME",
|
|
190
|
+
"nullable": false,
|
|
191
|
+
"default": "CURRENT_TIMESTAMP"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"name": "updated_at",
|
|
195
|
+
"type": "DATETIME",
|
|
196
|
+
"nullable": false,
|
|
197
|
+
"default": "CURRENT_TIMESTAMP"
|
|
198
|
+
}
|
|
199
|
+
],
|
|
200
|
+
"indexes": [
|
|
201
|
+
{
|
|
202
|
+
"name": "sqlite_autoindex_artifact_standard_codes_1",
|
|
203
|
+
"def": "PRIMARY KEY (code_group_code, code)",
|
|
204
|
+
"table": "artifact_standard_codes",
|
|
205
|
+
"columns": [
|
|
206
|
+
"code_group_code",
|
|
207
|
+
"code"
|
|
208
|
+
]
|
|
209
|
+
}
|
|
210
|
+
],
|
|
211
|
+
"constraints": [
|
|
212
|
+
{
|
|
213
|
+
"name": "code_group_code",
|
|
214
|
+
"type": "PRIMARY KEY",
|
|
215
|
+
"def": "PRIMARY KEY (code_group_code)",
|
|
216
|
+
"table": "artifact_standard_codes",
|
|
217
|
+
"columns": [
|
|
218
|
+
"code_group_code"
|
|
219
|
+
]
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"name": "code",
|
|
223
|
+
"type": "PRIMARY KEY",
|
|
224
|
+
"def": "PRIMARY KEY (code)",
|
|
225
|
+
"table": "artifact_standard_codes",
|
|
226
|
+
"columns": [
|
|
227
|
+
"code"
|
|
228
|
+
]
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"name": "- (Foreign key ID: 0)",
|
|
232
|
+
"type": "FOREIGN KEY",
|
|
233
|
+
"def": "FOREIGN KEY (code_group_code) REFERENCES artifact_standard_code_groups (code_group_code) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE",
|
|
234
|
+
"table": "artifact_standard_codes",
|
|
235
|
+
"referenced_table": "artifact_standard_code_groups",
|
|
236
|
+
"columns": [
|
|
237
|
+
"code_group_code"
|
|
238
|
+
],
|
|
239
|
+
"referenced_columns": [
|
|
240
|
+
"code_group_code"
|
|
241
|
+
]
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"name": "sqlite_autoindex_artifact_standard_codes_1",
|
|
245
|
+
"type": "PRIMARY KEY",
|
|
246
|
+
"def": "PRIMARY KEY (code_group_code, code)",
|
|
247
|
+
"table": "artifact_standard_codes",
|
|
248
|
+
"columns": [
|
|
249
|
+
"code_group_code",
|
|
250
|
+
"code"
|
|
251
|
+
]
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"name": "-",
|
|
255
|
+
"type": "CHECK",
|
|
256
|
+
"def": "CHECK (is_active IN (0, 1))",
|
|
257
|
+
"table": "artifact_standard_codes",
|
|
258
|
+
"columns": [
|
|
259
|
+
"is_active"
|
|
260
|
+
]
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"name": "-",
|
|
264
|
+
"type": "CHECK",
|
|
265
|
+
"def": "CHECK (metadata_json IS NULL OR json_valid(metadata_json))",
|
|
266
|
+
"table": "artifact_standard_codes",
|
|
267
|
+
"columns": [
|
|
268
|
+
"metadata_json"
|
|
269
|
+
]
|
|
270
|
+
}
|
|
271
|
+
],
|
|
272
|
+
"def": "CREATE TABLE artifact_standard_codes (\n -- 코드 그룹 식별자\n code_group_code VARCHAR(64) NOT NULL,\n\n -- 코드 값. UPPER_SNAKE_CASE를 사용한다.\n code VARCHAR(128) NOT NULL,\n\n -- 코드 한글명\n code_name VARCHAR(128) NOT NULL,\n\n -- 코드 설명\n description TEXT,\n\n -- 표시 정렬 순서\n sort_order INTEGER NOT NULL DEFAULT 0,\n\n -- 활성 여부. 1은 활성, 0은 비활성\n is_active INTEGER NOT NULL DEFAULT 1\n CHECK (is_active IN (0, 1)),\n\n -- 확장 메타데이터\n metadata_json JSON\n CHECK (metadata_json IS NULL OR json_valid(metadata_json)),\n\n -- 생성 시각\n created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 수정 시각\n updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n PRIMARY KEY (code_group_code, code),\n\n FOREIGN KEY (code_group_code)\n REFERENCES artifact_standard_code_groups (code_group_code)\n ON DELETE CASCADE\n)"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"name": "artifact_standard_standards",
|
|
276
|
+
"type": "table",
|
|
277
|
+
"comment": "산출물 표준의 최상위 versioned definition을 관리한다.",
|
|
278
|
+
"columns": [
|
|
279
|
+
{
|
|
280
|
+
"name": "artifact_standard_id",
|
|
281
|
+
"type": "CHAR(36)",
|
|
282
|
+
"nullable": true
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"name": "artifact_standard_code",
|
|
286
|
+
"type": "VARCHAR(128)",
|
|
287
|
+
"nullable": false
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"name": "artifact_standard_version",
|
|
291
|
+
"type": "VARCHAR(64)",
|
|
292
|
+
"nullable": false
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"name": "artifact_standard_name",
|
|
296
|
+
"type": "VARCHAR(256)",
|
|
297
|
+
"nullable": false
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"name": "standard_type_code",
|
|
301
|
+
"type": "VARCHAR(64)",
|
|
302
|
+
"nullable": false,
|
|
303
|
+
"default": "'DOCUMENT'"
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"name": "standard_status_code",
|
|
307
|
+
"type": "VARCHAR(64)",
|
|
308
|
+
"nullable": false,
|
|
309
|
+
"default": "'DRAFT'"
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"name": "purpose",
|
|
313
|
+
"type": "TEXT",
|
|
314
|
+
"nullable": true
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"name": "description",
|
|
318
|
+
"type": "TEXT",
|
|
319
|
+
"nullable": true
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"name": "owner_role_code",
|
|
323
|
+
"type": "VARCHAR(128)",
|
|
324
|
+
"nullable": true
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"name": "is_active",
|
|
328
|
+
"type": "INTEGER",
|
|
329
|
+
"nullable": false,
|
|
330
|
+
"default": "1"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"name": "created_at",
|
|
334
|
+
"type": "DATETIME",
|
|
335
|
+
"nullable": false,
|
|
336
|
+
"default": "CURRENT_TIMESTAMP"
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"name": "updated_at",
|
|
340
|
+
"type": "DATETIME",
|
|
341
|
+
"nullable": false,
|
|
342
|
+
"default": "CURRENT_TIMESTAMP"
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"name": "metadata_json",
|
|
346
|
+
"type": "JSON",
|
|
347
|
+
"nullable": true
|
|
348
|
+
}
|
|
349
|
+
],
|
|
350
|
+
"indexes": [
|
|
351
|
+
{
|
|
352
|
+
"name": "sqlite_autoindex_artifact_standard_standards_2",
|
|
353
|
+
"def": "UNIQUE (artifact_standard_code, artifact_standard_version)",
|
|
354
|
+
"table": "artifact_standard_standards",
|
|
355
|
+
"columns": [
|
|
356
|
+
"artifact_standard_code",
|
|
357
|
+
"artifact_standard_version"
|
|
358
|
+
]
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"name": "sqlite_autoindex_artifact_standard_standards_1",
|
|
362
|
+
"def": "PRIMARY KEY (artifact_standard_id)",
|
|
363
|
+
"table": "artifact_standard_standards",
|
|
364
|
+
"columns": [
|
|
365
|
+
"artifact_standard_id"
|
|
366
|
+
]
|
|
367
|
+
}
|
|
368
|
+
],
|
|
369
|
+
"constraints": [
|
|
370
|
+
{
|
|
371
|
+
"name": "artifact_standard_id",
|
|
372
|
+
"type": "PRIMARY KEY",
|
|
373
|
+
"def": "PRIMARY KEY (artifact_standard_id)",
|
|
374
|
+
"table": "artifact_standard_standards",
|
|
375
|
+
"columns": [
|
|
376
|
+
"artifact_standard_id"
|
|
377
|
+
]
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"name": "sqlite_autoindex_artifact_standard_standards_2",
|
|
381
|
+
"type": "UNIQUE",
|
|
382
|
+
"def": "UNIQUE (artifact_standard_code, artifact_standard_version)",
|
|
383
|
+
"table": "artifact_standard_standards",
|
|
384
|
+
"columns": [
|
|
385
|
+
"artifact_standard_code",
|
|
386
|
+
"artifact_standard_version"
|
|
387
|
+
]
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
"name": "sqlite_autoindex_artifact_standard_standards_1",
|
|
391
|
+
"type": "PRIMARY KEY",
|
|
392
|
+
"def": "PRIMARY KEY (artifact_standard_id)",
|
|
393
|
+
"table": "artifact_standard_standards",
|
|
394
|
+
"columns": [
|
|
395
|
+
"artifact_standard_id"
|
|
396
|
+
]
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"name": "-",
|
|
400
|
+
"type": "CHECK",
|
|
401
|
+
"def": "CHECK (length(artifact_standard_id) = 36)",
|
|
402
|
+
"table": "artifact_standard_standards",
|
|
403
|
+
"columns": [
|
|
404
|
+
"artifact_standard_id"
|
|
405
|
+
]
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"name": "-",
|
|
409
|
+
"type": "CHECK",
|
|
410
|
+
"def": "CHECK (is_active IN (0, 1))",
|
|
411
|
+
"table": "artifact_standard_standards",
|
|
412
|
+
"columns": [
|
|
413
|
+
"is_active"
|
|
414
|
+
]
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"name": "-",
|
|
418
|
+
"type": "CHECK",
|
|
419
|
+
"def": "CHECK (metadata_json IS NULL OR json_valid(metadata_json))",
|
|
420
|
+
"table": "artifact_standard_standards",
|
|
421
|
+
"columns": [
|
|
422
|
+
"metadata_json"
|
|
423
|
+
]
|
|
424
|
+
}
|
|
425
|
+
],
|
|
426
|
+
"def": "CREATE TABLE artifact_standard_standards (\n -- 산출물 표준 식별자\n artifact_standard_id CHAR(36) PRIMARY KEY\n CHECK (length(artifact_standard_id) = 36),\n\n -- 산출물 표준 코드\n artifact_standard_code VARCHAR(128) NOT NULL,\n\n -- 산출물 표준 버전\n artifact_standard_version VARCHAR(64) NOT NULL,\n\n -- 산출물 표준명\n artifact_standard_name VARCHAR(256) NOT NULL,\n\n -- 산출물 표준 유형 코드\n standard_type_code VARCHAR(64) NOT NULL DEFAULT 'DOCUMENT',\n\n -- 산출물 표준 상태 코드\n standard_status_code VARCHAR(64) NOT NULL DEFAULT 'DRAFT',\n\n -- 산출물 표준 목적\n purpose TEXT,\n\n -- 산출물 표준 설명\n description TEXT,\n\n -- 소유 역할 코드\n owner_role_code VARCHAR(128),\n\n -- 활성 여부\n is_active INTEGER NOT NULL DEFAULT 1\n CHECK (is_active IN (0, 1)),\n\n -- 생성 시각\n created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 수정 시각\n updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 확장 메타데이터\n metadata_json JSON\n CHECK (metadata_json IS NULL OR json_valid(metadata_json)),\n\n UNIQUE (artifact_standard_code, artifact_standard_version)\n)"
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
"name": "artifact_standard_components",
|
|
430
|
+
"type": "table",
|
|
431
|
+
"comment": "산출물 표준을 구성하는 개념, 서식, 가이드, 예시, LLM 보충 지침 resource를 관리한다.",
|
|
432
|
+
"columns": [
|
|
433
|
+
{
|
|
434
|
+
"name": "component_id",
|
|
435
|
+
"type": "CHAR(36)",
|
|
436
|
+
"nullable": true
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
"name": "artifact_standard_id",
|
|
440
|
+
"type": "CHAR(36)",
|
|
441
|
+
"nullable": false
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
"name": "component_code",
|
|
445
|
+
"type": "VARCHAR(128)",
|
|
446
|
+
"nullable": false
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
"name": "component_type_code",
|
|
450
|
+
"type": "VARCHAR(64)",
|
|
451
|
+
"nullable": false
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
"name": "component_title",
|
|
455
|
+
"type": "VARCHAR(256)",
|
|
456
|
+
"nullable": false
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
"name": "component_purpose",
|
|
460
|
+
"type": "TEXT",
|
|
461
|
+
"nullable": true
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
"name": "applicability_code",
|
|
465
|
+
"type": "VARCHAR(64)",
|
|
466
|
+
"nullable": false,
|
|
467
|
+
"default": "'COMMON_REFERENCE'"
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
"name": "resource_ref_type_code",
|
|
471
|
+
"type": "VARCHAR(64)",
|
|
472
|
+
"nullable": false,
|
|
473
|
+
"default": "'FILE_PATH'"
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
"name": "resource_ref",
|
|
477
|
+
"type": "VARCHAR(1024)",
|
|
478
|
+
"nullable": true
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
"name": "sort_order",
|
|
482
|
+
"type": "INTEGER",
|
|
483
|
+
"nullable": false,
|
|
484
|
+
"default": "0"
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
"name": "is_active",
|
|
488
|
+
"type": "INTEGER",
|
|
489
|
+
"nullable": false,
|
|
490
|
+
"default": "1"
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
"name": "created_at",
|
|
494
|
+
"type": "DATETIME",
|
|
495
|
+
"nullable": false,
|
|
496
|
+
"default": "CURRENT_TIMESTAMP"
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
"name": "updated_at",
|
|
500
|
+
"type": "DATETIME",
|
|
501
|
+
"nullable": false,
|
|
502
|
+
"default": "CURRENT_TIMESTAMP"
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
"name": "metadata_json",
|
|
506
|
+
"type": "JSON",
|
|
507
|
+
"nullable": true
|
|
508
|
+
}
|
|
509
|
+
],
|
|
510
|
+
"indexes": [
|
|
511
|
+
{
|
|
512
|
+
"name": "idx_artifact_standard_components_standard",
|
|
513
|
+
"def": "CREATE INDEX idx_artifact_standard_components_standard\n ON artifact_standard_components (artifact_standard_id)",
|
|
514
|
+
"table": "artifact_standard_components",
|
|
515
|
+
"columns": [
|
|
516
|
+
"artifact_standard_id"
|
|
517
|
+
]
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
"name": "sqlite_autoindex_artifact_standard_components_2",
|
|
521
|
+
"def": "UNIQUE (artifact_standard_id, component_code)",
|
|
522
|
+
"table": "artifact_standard_components",
|
|
523
|
+
"columns": [
|
|
524
|
+
"artifact_standard_id",
|
|
525
|
+
"component_code"
|
|
526
|
+
]
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"name": "sqlite_autoindex_artifact_standard_components_1",
|
|
530
|
+
"def": "PRIMARY KEY (component_id)",
|
|
531
|
+
"table": "artifact_standard_components",
|
|
532
|
+
"columns": [
|
|
533
|
+
"component_id"
|
|
534
|
+
]
|
|
535
|
+
}
|
|
536
|
+
],
|
|
537
|
+
"constraints": [
|
|
538
|
+
{
|
|
539
|
+
"name": "component_id",
|
|
540
|
+
"type": "PRIMARY KEY",
|
|
541
|
+
"def": "PRIMARY KEY (component_id)",
|
|
542
|
+
"table": "artifact_standard_components",
|
|
543
|
+
"columns": [
|
|
544
|
+
"component_id"
|
|
545
|
+
]
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
"name": "- (Foreign key ID: 0)",
|
|
549
|
+
"type": "FOREIGN KEY",
|
|
550
|
+
"def": "FOREIGN KEY (artifact_standard_id) REFERENCES artifact_standard_standards (artifact_standard_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE",
|
|
551
|
+
"table": "artifact_standard_components",
|
|
552
|
+
"referenced_table": "artifact_standard_standards",
|
|
553
|
+
"columns": [
|
|
554
|
+
"artifact_standard_id"
|
|
555
|
+
],
|
|
556
|
+
"referenced_columns": [
|
|
557
|
+
"artifact_standard_id"
|
|
558
|
+
]
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
"name": "sqlite_autoindex_artifact_standard_components_2",
|
|
562
|
+
"type": "UNIQUE",
|
|
563
|
+
"def": "UNIQUE (artifact_standard_id, component_code)",
|
|
564
|
+
"table": "artifact_standard_components",
|
|
565
|
+
"columns": [
|
|
566
|
+
"artifact_standard_id",
|
|
567
|
+
"component_code"
|
|
568
|
+
]
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
"name": "sqlite_autoindex_artifact_standard_components_1",
|
|
572
|
+
"type": "PRIMARY KEY",
|
|
573
|
+
"def": "PRIMARY KEY (component_id)",
|
|
574
|
+
"table": "artifact_standard_components",
|
|
575
|
+
"columns": [
|
|
576
|
+
"component_id"
|
|
577
|
+
]
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
"name": "-",
|
|
581
|
+
"type": "CHECK",
|
|
582
|
+
"def": "CHECK (length(component_id) = 36)",
|
|
583
|
+
"table": "artifact_standard_components",
|
|
584
|
+
"columns": [
|
|
585
|
+
"component_id"
|
|
586
|
+
]
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
"name": "-",
|
|
590
|
+
"type": "CHECK",
|
|
591
|
+
"def": "CHECK (length(artifact_standard_id) = 36)",
|
|
592
|
+
"table": "artifact_standard_components",
|
|
593
|
+
"columns": [
|
|
594
|
+
"artifact_standard_id"
|
|
595
|
+
]
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
"name": "-",
|
|
599
|
+
"type": "CHECK",
|
|
600
|
+
"def": "CHECK (is_active IN (0, 1))",
|
|
601
|
+
"table": "artifact_standard_components",
|
|
602
|
+
"columns": [
|
|
603
|
+
"is_active"
|
|
604
|
+
]
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
"name": "-",
|
|
608
|
+
"type": "CHECK",
|
|
609
|
+
"def": "CHECK (metadata_json IS NULL OR json_valid(metadata_json))",
|
|
610
|
+
"table": "artifact_standard_components",
|
|
611
|
+
"columns": [
|
|
612
|
+
"metadata_json"
|
|
613
|
+
]
|
|
614
|
+
}
|
|
615
|
+
],
|
|
616
|
+
"def": "CREATE TABLE artifact_standard_components (\n -- component 식별자\n component_id CHAR(36) PRIMARY KEY\n CHECK (length(component_id) = 36),\n\n -- 소속 산출물 표준 식별자\n artifact_standard_id CHAR(36) NOT NULL\n CHECK (length(artifact_standard_id) = 36),\n\n -- component 코드\n component_code VARCHAR(128) NOT NULL,\n\n -- component 유형 코드\n component_type_code VARCHAR(64) NOT NULL,\n\n -- component 제목\n component_title VARCHAR(256) NOT NULL,\n\n -- component 목적\n component_purpose TEXT,\n\n -- 적용 성격 코드\n applicability_code VARCHAR(64) NOT NULL DEFAULT 'COMMON_REFERENCE',\n\n -- 참조 유형 코드\n resource_ref_type_code VARCHAR(64) NOT NULL DEFAULT 'FILE_PATH',\n\n -- 참조 값\n resource_ref VARCHAR(1024),\n\n -- 표시 정렬 순서\n sort_order INTEGER NOT NULL DEFAULT 0,\n\n -- 활성 여부\n is_active INTEGER NOT NULL DEFAULT 1\n CHECK (is_active IN (0, 1)),\n\n -- 생성 시각\n created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 수정 시각\n updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 확장 메타데이터\n metadata_json JSON\n CHECK (metadata_json IS NULL OR json_valid(metadata_json)),\n\n FOREIGN KEY (artifact_standard_id)\n REFERENCES artifact_standard_standards (artifact_standard_id)\n ON DELETE CASCADE,\n\n UNIQUE (artifact_standard_id, component_code)\n)"
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
"name": "artifact_standard_component_bindings",
|
|
620
|
+
"type": "table",
|
|
621
|
+
"columns": [
|
|
622
|
+
{
|
|
623
|
+
"name": "component_binding_id",
|
|
624
|
+
"type": "CHAR(36)",
|
|
625
|
+
"nullable": true
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
"name": "artifact_standard_id",
|
|
629
|
+
"type": "CHAR(36)",
|
|
630
|
+
"nullable": false
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
"name": "component_id",
|
|
634
|
+
"type": "CHAR(36)",
|
|
635
|
+
"nullable": false
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
"name": "target_type_code",
|
|
639
|
+
"type": "VARCHAR(128)",
|
|
640
|
+
"nullable": false
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
"name": "target_ref",
|
|
644
|
+
"type": "VARCHAR(256)",
|
|
645
|
+
"nullable": false
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
"name": "binding_role_code",
|
|
649
|
+
"type": "VARCHAR(128)",
|
|
650
|
+
"nullable": false
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
"name": "priority",
|
|
654
|
+
"type": "INTEGER",
|
|
655
|
+
"nullable": false,
|
|
656
|
+
"default": "100"
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
"name": "applies_when_json",
|
|
660
|
+
"type": "JSON",
|
|
661
|
+
"nullable": true
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
"name": "description",
|
|
665
|
+
"type": "TEXT",
|
|
666
|
+
"nullable": true
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
"name": "is_active",
|
|
670
|
+
"type": "INTEGER",
|
|
671
|
+
"nullable": false,
|
|
672
|
+
"default": "1"
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
"name": "created_at",
|
|
676
|
+
"type": "DATETIME",
|
|
677
|
+
"nullable": false,
|
|
678
|
+
"default": "CURRENT_TIMESTAMP"
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
"name": "updated_at",
|
|
682
|
+
"type": "DATETIME",
|
|
683
|
+
"nullable": false,
|
|
684
|
+
"default": "CURRENT_TIMESTAMP"
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
"name": "metadata_json",
|
|
688
|
+
"type": "JSON",
|
|
689
|
+
"nullable": true
|
|
690
|
+
}
|
|
691
|
+
],
|
|
692
|
+
"indexes": [
|
|
693
|
+
{
|
|
694
|
+
"name": "idx_artifact_standard_component_bindings_target",
|
|
695
|
+
"def": "CREATE INDEX idx_artifact_standard_component_bindings_target\n ON artifact_standard_component_bindings (target_type_code, target_ref)",
|
|
696
|
+
"table": "artifact_standard_component_bindings",
|
|
697
|
+
"columns": [
|
|
698
|
+
"target_type_code",
|
|
699
|
+
"target_ref"
|
|
700
|
+
]
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
"name": "idx_artifact_standard_component_bindings_standard",
|
|
704
|
+
"def": "CREATE INDEX idx_artifact_standard_component_bindings_standard\n ON artifact_standard_component_bindings (artifact_standard_id)",
|
|
705
|
+
"table": "artifact_standard_component_bindings",
|
|
706
|
+
"columns": [
|
|
707
|
+
"artifact_standard_id"
|
|
708
|
+
]
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
"name": "sqlite_autoindex_artifact_standard_component_bindings_2",
|
|
712
|
+
"def": "UNIQUE (component_id, target_type_code, target_ref, binding_role_code)",
|
|
713
|
+
"table": "artifact_standard_component_bindings",
|
|
714
|
+
"columns": [
|
|
715
|
+
"component_id",
|
|
716
|
+
"target_type_code",
|
|
717
|
+
"target_ref",
|
|
718
|
+
"binding_role_code"
|
|
719
|
+
]
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
"name": "sqlite_autoindex_artifact_standard_component_bindings_1",
|
|
723
|
+
"def": "PRIMARY KEY (component_binding_id)",
|
|
724
|
+
"table": "artifact_standard_component_bindings",
|
|
725
|
+
"columns": [
|
|
726
|
+
"component_binding_id"
|
|
727
|
+
]
|
|
728
|
+
}
|
|
729
|
+
],
|
|
730
|
+
"constraints": [
|
|
731
|
+
{
|
|
732
|
+
"name": "component_binding_id",
|
|
733
|
+
"type": "PRIMARY KEY",
|
|
734
|
+
"def": "PRIMARY KEY (component_binding_id)",
|
|
735
|
+
"table": "artifact_standard_component_bindings",
|
|
736
|
+
"columns": [
|
|
737
|
+
"component_binding_id"
|
|
738
|
+
]
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
"name": "- (Foreign key ID: 0)",
|
|
742
|
+
"type": "FOREIGN KEY",
|
|
743
|
+
"def": "FOREIGN KEY (component_id) REFERENCES artifact_standard_components (component_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE",
|
|
744
|
+
"table": "artifact_standard_component_bindings",
|
|
745
|
+
"referenced_table": "artifact_standard_components",
|
|
746
|
+
"columns": [
|
|
747
|
+
"component_id"
|
|
748
|
+
],
|
|
749
|
+
"referenced_columns": [
|
|
750
|
+
"component_id"
|
|
751
|
+
]
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
"name": "- (Foreign key ID: 1)",
|
|
755
|
+
"type": "FOREIGN KEY",
|
|
756
|
+
"def": "FOREIGN KEY (artifact_standard_id) REFERENCES artifact_standard_standards (artifact_standard_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE",
|
|
757
|
+
"table": "artifact_standard_component_bindings",
|
|
758
|
+
"referenced_table": "artifact_standard_standards",
|
|
759
|
+
"columns": [
|
|
760
|
+
"artifact_standard_id"
|
|
761
|
+
],
|
|
762
|
+
"referenced_columns": [
|
|
763
|
+
"artifact_standard_id"
|
|
764
|
+
]
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
"name": "sqlite_autoindex_artifact_standard_component_bindings_2",
|
|
768
|
+
"type": "UNIQUE",
|
|
769
|
+
"def": "UNIQUE (component_id, target_type_code, target_ref, binding_role_code)",
|
|
770
|
+
"table": "artifact_standard_component_bindings",
|
|
771
|
+
"columns": [
|
|
772
|
+
"component_id",
|
|
773
|
+
"target_type_code",
|
|
774
|
+
"target_ref",
|
|
775
|
+
"binding_role_code"
|
|
776
|
+
]
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
"name": "sqlite_autoindex_artifact_standard_component_bindings_1",
|
|
780
|
+
"type": "PRIMARY KEY",
|
|
781
|
+
"def": "PRIMARY KEY (component_binding_id)",
|
|
782
|
+
"table": "artifact_standard_component_bindings",
|
|
783
|
+
"columns": [
|
|
784
|
+
"component_binding_id"
|
|
785
|
+
]
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
"name": "-",
|
|
789
|
+
"type": "CHECK",
|
|
790
|
+
"def": "CHECK (length(component_binding_id) = 36)",
|
|
791
|
+
"table": "artifact_standard_component_bindings",
|
|
792
|
+
"columns": [
|
|
793
|
+
"component_binding_id"
|
|
794
|
+
]
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
"name": "-",
|
|
798
|
+
"type": "CHECK",
|
|
799
|
+
"def": "CHECK (length(artifact_standard_id) = 36)",
|
|
800
|
+
"table": "artifact_standard_component_bindings",
|
|
801
|
+
"columns": [
|
|
802
|
+
"artifact_standard_id"
|
|
803
|
+
]
|
|
804
|
+
},
|
|
805
|
+
{
|
|
806
|
+
"name": "-",
|
|
807
|
+
"type": "CHECK",
|
|
808
|
+
"def": "CHECK (length(component_id) = 36)",
|
|
809
|
+
"table": "artifact_standard_component_bindings",
|
|
810
|
+
"columns": [
|
|
811
|
+
"component_id"
|
|
812
|
+
]
|
|
813
|
+
},
|
|
814
|
+
{
|
|
815
|
+
"name": "-",
|
|
816
|
+
"type": "CHECK",
|
|
817
|
+
"def": "CHECK (applies_when_json IS NULL OR json_valid(applies_when_json))",
|
|
818
|
+
"table": "artifact_standard_component_bindings",
|
|
819
|
+
"columns": [
|
|
820
|
+
"applies_when_json"
|
|
821
|
+
]
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
"name": "-",
|
|
825
|
+
"type": "CHECK",
|
|
826
|
+
"def": "CHECK (is_active IN (0, 1))",
|
|
827
|
+
"table": "artifact_standard_component_bindings",
|
|
828
|
+
"columns": [
|
|
829
|
+
"is_active"
|
|
830
|
+
]
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
"name": "-",
|
|
834
|
+
"type": "CHECK",
|
|
835
|
+
"def": "CHECK (metadata_json IS NULL OR json_valid(metadata_json))",
|
|
836
|
+
"table": "artifact_standard_component_bindings",
|
|
837
|
+
"columns": [
|
|
838
|
+
"metadata_json"
|
|
839
|
+
]
|
|
840
|
+
}
|
|
841
|
+
],
|
|
842
|
+
"def": "CREATE TABLE artifact_standard_component_bindings (\n -- component binding 식별자\n component_binding_id CHAR(36) PRIMARY KEY\n CHECK (length(component_binding_id) = 36),\n\n -- 소속 산출물 표준 식별자\n artifact_standard_id CHAR(36) NOT NULL\n CHECK (length(artifact_standard_id) = 36),\n\n -- component 식별자\n component_id CHAR(36) NOT NULL\n CHECK (length(component_id) = 36),\n\n -- 적용 대상 유형 코드\n target_type_code VARCHAR(128) NOT NULL,\n\n -- 적용 대상 참조\n target_ref VARCHAR(256) NOT NULL,\n\n -- binding 역할 코드\n binding_role_code VARCHAR(128) NOT NULL,\n\n -- 우선순위\n priority INTEGER NOT NULL DEFAULT 100,\n\n -- 적용 조건\n applies_when_json JSON\n CHECK (applies_when_json IS NULL OR json_valid(applies_when_json)),\n\n -- 설명\n description TEXT,\n\n -- 활성 여부\n is_active INTEGER NOT NULL DEFAULT 1\n CHECK (is_active IN (0, 1)),\n\n -- 생성 시각\n created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 수정 시각\n updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 확장 메타데이터\n metadata_json JSON\n CHECK (metadata_json IS NULL OR json_valid(metadata_json)),\n\n FOREIGN KEY (artifact_standard_id)\n REFERENCES artifact_standard_standards (artifact_standard_id)\n ON DELETE CASCADE,\n\n FOREIGN KEY (component_id)\n REFERENCES artifact_standard_components (component_id)\n ON DELETE CASCADE,\n\n UNIQUE (component_id, target_type_code, target_ref, binding_role_code)\n)"
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
"name": "artifact_standard_document_blueprints",
|
|
846
|
+
"type": "table",
|
|
847
|
+
"comment": "산출물 문서 구조 기준을 관리한다.",
|
|
848
|
+
"columns": [
|
|
849
|
+
{
|
|
850
|
+
"name": "blueprint_id",
|
|
851
|
+
"type": "CHAR(36)",
|
|
852
|
+
"nullable": true
|
|
853
|
+
},
|
|
854
|
+
{
|
|
855
|
+
"name": "artifact_standard_id",
|
|
856
|
+
"type": "CHAR(36)",
|
|
857
|
+
"nullable": false
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
"name": "blueprint_code",
|
|
861
|
+
"type": "VARCHAR(128)",
|
|
862
|
+
"nullable": false
|
|
863
|
+
},
|
|
864
|
+
{
|
|
865
|
+
"name": "blueprint_name",
|
|
866
|
+
"type": "VARCHAR(256)",
|
|
867
|
+
"nullable": false
|
|
868
|
+
},
|
|
869
|
+
{
|
|
870
|
+
"name": "document_type_code",
|
|
871
|
+
"type": "VARCHAR(128)",
|
|
872
|
+
"nullable": false
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
"name": "taxonomy_code",
|
|
876
|
+
"type": "VARCHAR(128)",
|
|
877
|
+
"nullable": true
|
|
878
|
+
},
|
|
879
|
+
{
|
|
880
|
+
"name": "default_toc_level_limit",
|
|
881
|
+
"type": "INTEGER",
|
|
882
|
+
"nullable": false,
|
|
883
|
+
"default": "3"
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
"name": "description",
|
|
887
|
+
"type": "TEXT",
|
|
888
|
+
"nullable": true
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
"name": "created_at",
|
|
892
|
+
"type": "DATETIME",
|
|
893
|
+
"nullable": false,
|
|
894
|
+
"default": "CURRENT_TIMESTAMP"
|
|
895
|
+
},
|
|
896
|
+
{
|
|
897
|
+
"name": "updated_at",
|
|
898
|
+
"type": "DATETIME",
|
|
899
|
+
"nullable": false,
|
|
900
|
+
"default": "CURRENT_TIMESTAMP"
|
|
901
|
+
},
|
|
902
|
+
{
|
|
903
|
+
"name": "metadata_json",
|
|
904
|
+
"type": "JSON",
|
|
905
|
+
"nullable": true
|
|
906
|
+
}
|
|
907
|
+
],
|
|
908
|
+
"indexes": [
|
|
909
|
+
{
|
|
910
|
+
"name": "sqlite_autoindex_artifact_standard_document_blueprints_2",
|
|
911
|
+
"def": "UNIQUE (artifact_standard_id, blueprint_code)",
|
|
912
|
+
"table": "artifact_standard_document_blueprints",
|
|
913
|
+
"columns": [
|
|
914
|
+
"artifact_standard_id",
|
|
915
|
+
"blueprint_code"
|
|
916
|
+
]
|
|
917
|
+
},
|
|
918
|
+
{
|
|
919
|
+
"name": "sqlite_autoindex_artifact_standard_document_blueprints_1",
|
|
920
|
+
"def": "PRIMARY KEY (blueprint_id)",
|
|
921
|
+
"table": "artifact_standard_document_blueprints",
|
|
922
|
+
"columns": [
|
|
923
|
+
"blueprint_id"
|
|
924
|
+
]
|
|
925
|
+
}
|
|
926
|
+
],
|
|
927
|
+
"constraints": [
|
|
928
|
+
{
|
|
929
|
+
"name": "blueprint_id",
|
|
930
|
+
"type": "PRIMARY KEY",
|
|
931
|
+
"def": "PRIMARY KEY (blueprint_id)",
|
|
932
|
+
"table": "artifact_standard_document_blueprints",
|
|
933
|
+
"columns": [
|
|
934
|
+
"blueprint_id"
|
|
935
|
+
]
|
|
936
|
+
},
|
|
937
|
+
{
|
|
938
|
+
"name": "- (Foreign key ID: 0)",
|
|
939
|
+
"type": "FOREIGN KEY",
|
|
940
|
+
"def": "FOREIGN KEY (artifact_standard_id) REFERENCES artifact_standard_standards (artifact_standard_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE",
|
|
941
|
+
"table": "artifact_standard_document_blueprints",
|
|
942
|
+
"referenced_table": "artifact_standard_standards",
|
|
943
|
+
"columns": [
|
|
944
|
+
"artifact_standard_id"
|
|
945
|
+
],
|
|
946
|
+
"referenced_columns": [
|
|
947
|
+
"artifact_standard_id"
|
|
948
|
+
]
|
|
949
|
+
},
|
|
950
|
+
{
|
|
951
|
+
"name": "sqlite_autoindex_artifact_standard_document_blueprints_2",
|
|
952
|
+
"type": "UNIQUE",
|
|
953
|
+
"def": "UNIQUE (artifact_standard_id, blueprint_code)",
|
|
954
|
+
"table": "artifact_standard_document_blueprints",
|
|
955
|
+
"columns": [
|
|
956
|
+
"artifact_standard_id",
|
|
957
|
+
"blueprint_code"
|
|
958
|
+
]
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
"name": "sqlite_autoindex_artifact_standard_document_blueprints_1",
|
|
962
|
+
"type": "PRIMARY KEY",
|
|
963
|
+
"def": "PRIMARY KEY (blueprint_id)",
|
|
964
|
+
"table": "artifact_standard_document_blueprints",
|
|
965
|
+
"columns": [
|
|
966
|
+
"blueprint_id"
|
|
967
|
+
]
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
"name": "-",
|
|
971
|
+
"type": "CHECK",
|
|
972
|
+
"def": "CHECK (length(blueprint_id) = 36)",
|
|
973
|
+
"table": "artifact_standard_document_blueprints",
|
|
974
|
+
"columns": [
|
|
975
|
+
"blueprint_id"
|
|
976
|
+
]
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
"name": "-",
|
|
980
|
+
"type": "CHECK",
|
|
981
|
+
"def": "CHECK (length(artifact_standard_id) = 36)",
|
|
982
|
+
"table": "artifact_standard_document_blueprints",
|
|
983
|
+
"columns": [
|
|
984
|
+
"artifact_standard_id"
|
|
985
|
+
]
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
"name": "-",
|
|
989
|
+
"type": "CHECK",
|
|
990
|
+
"def": "CHECK (default_toc_level_limit \u003e= 1)",
|
|
991
|
+
"table": "artifact_standard_document_blueprints",
|
|
992
|
+
"columns": [
|
|
993
|
+
"default_toc_level_limit"
|
|
994
|
+
]
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
"name": "-",
|
|
998
|
+
"type": "CHECK",
|
|
999
|
+
"def": "CHECK (metadata_json IS NULL OR json_valid(metadata_json))",
|
|
1000
|
+
"table": "artifact_standard_document_blueprints",
|
|
1001
|
+
"columns": [
|
|
1002
|
+
"metadata_json"
|
|
1003
|
+
]
|
|
1004
|
+
}
|
|
1005
|
+
],
|
|
1006
|
+
"def": "CREATE TABLE artifact_standard_document_blueprints (\n -- blueprint 식별자\n blueprint_id CHAR(36) PRIMARY KEY\n CHECK (length(blueprint_id) = 36),\n\n -- 소속 산출물 표준 식별자\n artifact_standard_id CHAR(36) NOT NULL\n CHECK (length(artifact_standard_id) = 36),\n\n -- blueprint 코드\n blueprint_code VARCHAR(128) NOT NULL,\n\n -- blueprint 이름\n blueprint_name VARCHAR(256) NOT NULL,\n\n -- 문서 유형 코드\n document_type_code VARCHAR(128) NOT NULL,\n\n -- document taxonomy 코드\n taxonomy_code VARCHAR(128),\n\n -- 기본 TOC level limit\n default_toc_level_limit INTEGER NOT NULL DEFAULT 3\n CHECK (default_toc_level_limit \u003e= 1),\n\n -- 설명\n description TEXT,\n\n -- 생성 시각\n created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 수정 시각\n updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 확장 메타데이터\n metadata_json JSON\n CHECK (metadata_json IS NULL OR json_valid(metadata_json)),\n\n FOREIGN KEY (artifact_standard_id)\n REFERENCES artifact_standard_standards (artifact_standard_id)\n ON DELETE CASCADE,\n\n UNIQUE (artifact_standard_id, blueprint_code)\n)"
|
|
1007
|
+
},
|
|
1008
|
+
{
|
|
1009
|
+
"name": "artifact_standard_blueprint_nodes",
|
|
1010
|
+
"type": "table",
|
|
1011
|
+
"columns": [
|
|
1012
|
+
{
|
|
1013
|
+
"name": "blueprint_node_id",
|
|
1014
|
+
"type": "CHAR(36)",
|
|
1015
|
+
"nullable": true
|
|
1016
|
+
},
|
|
1017
|
+
{
|
|
1018
|
+
"name": "blueprint_id",
|
|
1019
|
+
"type": "CHAR(36)",
|
|
1020
|
+
"nullable": false
|
|
1021
|
+
},
|
|
1022
|
+
{
|
|
1023
|
+
"name": "parent_blueprint_node_id",
|
|
1024
|
+
"type": "CHAR(36)",
|
|
1025
|
+
"nullable": true
|
|
1026
|
+
},
|
|
1027
|
+
{
|
|
1028
|
+
"name": "node_code",
|
|
1029
|
+
"type": "VARCHAR(128)",
|
|
1030
|
+
"nullable": false
|
|
1031
|
+
},
|
|
1032
|
+
{
|
|
1033
|
+
"name": "node_title",
|
|
1034
|
+
"type": "VARCHAR(256)",
|
|
1035
|
+
"nullable": false
|
|
1036
|
+
},
|
|
1037
|
+
{
|
|
1038
|
+
"name": "node_type_code",
|
|
1039
|
+
"type": "VARCHAR(64)",
|
|
1040
|
+
"nullable": false,
|
|
1041
|
+
"default": "'BODY'"
|
|
1042
|
+
},
|
|
1043
|
+
{
|
|
1044
|
+
"name": "node_level",
|
|
1045
|
+
"type": "INTEGER",
|
|
1046
|
+
"nullable": false,
|
|
1047
|
+
"default": "1"
|
|
1048
|
+
},
|
|
1049
|
+
{
|
|
1050
|
+
"name": "toc_visible",
|
|
1051
|
+
"type": "INTEGER",
|
|
1052
|
+
"nullable": false,
|
|
1053
|
+
"default": "1"
|
|
1054
|
+
},
|
|
1055
|
+
{
|
|
1056
|
+
"name": "is_required",
|
|
1057
|
+
"type": "INTEGER",
|
|
1058
|
+
"nullable": false,
|
|
1059
|
+
"default": "1"
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
"name": "is_repeatable",
|
|
1063
|
+
"type": "INTEGER",
|
|
1064
|
+
"nullable": false,
|
|
1065
|
+
"default": "0"
|
|
1066
|
+
},
|
|
1067
|
+
{
|
|
1068
|
+
"name": "repeat_context_code",
|
|
1069
|
+
"type": "VARCHAR(128)",
|
|
1070
|
+
"nullable": true
|
|
1071
|
+
},
|
|
1072
|
+
{
|
|
1073
|
+
"name": "taxonomy_ref",
|
|
1074
|
+
"type": "VARCHAR(256)",
|
|
1075
|
+
"nullable": true
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
"name": "description",
|
|
1079
|
+
"type": "TEXT",
|
|
1080
|
+
"nullable": true
|
|
1081
|
+
},
|
|
1082
|
+
{
|
|
1083
|
+
"name": "sort_order",
|
|
1084
|
+
"type": "INTEGER",
|
|
1085
|
+
"nullable": false,
|
|
1086
|
+
"default": "0"
|
|
1087
|
+
},
|
|
1088
|
+
{
|
|
1089
|
+
"name": "created_at",
|
|
1090
|
+
"type": "DATETIME",
|
|
1091
|
+
"nullable": false,
|
|
1092
|
+
"default": "CURRENT_TIMESTAMP"
|
|
1093
|
+
},
|
|
1094
|
+
{
|
|
1095
|
+
"name": "updated_at",
|
|
1096
|
+
"type": "DATETIME",
|
|
1097
|
+
"nullable": false,
|
|
1098
|
+
"default": "CURRENT_TIMESTAMP"
|
|
1099
|
+
},
|
|
1100
|
+
{
|
|
1101
|
+
"name": "metadata_json",
|
|
1102
|
+
"type": "JSON",
|
|
1103
|
+
"nullable": true
|
|
1104
|
+
}
|
|
1105
|
+
],
|
|
1106
|
+
"indexes": [
|
|
1107
|
+
{
|
|
1108
|
+
"name": "idx_artifact_standard_blueprint_nodes_blueprint",
|
|
1109
|
+
"def": "CREATE INDEX idx_artifact_standard_blueprint_nodes_blueprint\n ON artifact_standard_blueprint_nodes (blueprint_id)",
|
|
1110
|
+
"table": "artifact_standard_blueprint_nodes",
|
|
1111
|
+
"columns": [
|
|
1112
|
+
"blueprint_id"
|
|
1113
|
+
]
|
|
1114
|
+
},
|
|
1115
|
+
{
|
|
1116
|
+
"name": "sqlite_autoindex_artifact_standard_blueprint_nodes_2",
|
|
1117
|
+
"def": "UNIQUE (blueprint_id, node_code)",
|
|
1118
|
+
"table": "artifact_standard_blueprint_nodes",
|
|
1119
|
+
"columns": [
|
|
1120
|
+
"blueprint_id",
|
|
1121
|
+
"node_code"
|
|
1122
|
+
]
|
|
1123
|
+
},
|
|
1124
|
+
{
|
|
1125
|
+
"name": "sqlite_autoindex_artifact_standard_blueprint_nodes_1",
|
|
1126
|
+
"def": "PRIMARY KEY (blueprint_node_id)",
|
|
1127
|
+
"table": "artifact_standard_blueprint_nodes",
|
|
1128
|
+
"columns": [
|
|
1129
|
+
"blueprint_node_id"
|
|
1130
|
+
]
|
|
1131
|
+
}
|
|
1132
|
+
],
|
|
1133
|
+
"constraints": [
|
|
1134
|
+
{
|
|
1135
|
+
"name": "blueprint_node_id",
|
|
1136
|
+
"type": "PRIMARY KEY",
|
|
1137
|
+
"def": "PRIMARY KEY (blueprint_node_id)",
|
|
1138
|
+
"table": "artifact_standard_blueprint_nodes",
|
|
1139
|
+
"columns": [
|
|
1140
|
+
"blueprint_node_id"
|
|
1141
|
+
]
|
|
1142
|
+
},
|
|
1143
|
+
{
|
|
1144
|
+
"name": "- (Foreign key ID: 0)",
|
|
1145
|
+
"type": "FOREIGN KEY",
|
|
1146
|
+
"def": "FOREIGN KEY (parent_blueprint_node_id) REFERENCES artifact_standard_blueprint_nodes (blueprint_node_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE",
|
|
1147
|
+
"table": "artifact_standard_blueprint_nodes",
|
|
1148
|
+
"referenced_table": "artifact_standard_blueprint_nodes",
|
|
1149
|
+
"columns": [
|
|
1150
|
+
"parent_blueprint_node_id"
|
|
1151
|
+
],
|
|
1152
|
+
"referenced_columns": [
|
|
1153
|
+
"blueprint_node_id"
|
|
1154
|
+
]
|
|
1155
|
+
},
|
|
1156
|
+
{
|
|
1157
|
+
"name": "- (Foreign key ID: 1)",
|
|
1158
|
+
"type": "FOREIGN KEY",
|
|
1159
|
+
"def": "FOREIGN KEY (blueprint_id) REFERENCES artifact_standard_document_blueprints (blueprint_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE",
|
|
1160
|
+
"table": "artifact_standard_blueprint_nodes",
|
|
1161
|
+
"referenced_table": "artifact_standard_document_blueprints",
|
|
1162
|
+
"columns": [
|
|
1163
|
+
"blueprint_id"
|
|
1164
|
+
],
|
|
1165
|
+
"referenced_columns": [
|
|
1166
|
+
"blueprint_id"
|
|
1167
|
+
]
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
"name": "sqlite_autoindex_artifact_standard_blueprint_nodes_2",
|
|
1171
|
+
"type": "UNIQUE",
|
|
1172
|
+
"def": "UNIQUE (blueprint_id, node_code)",
|
|
1173
|
+
"table": "artifact_standard_blueprint_nodes",
|
|
1174
|
+
"columns": [
|
|
1175
|
+
"blueprint_id",
|
|
1176
|
+
"node_code"
|
|
1177
|
+
]
|
|
1178
|
+
},
|
|
1179
|
+
{
|
|
1180
|
+
"name": "sqlite_autoindex_artifact_standard_blueprint_nodes_1",
|
|
1181
|
+
"type": "PRIMARY KEY",
|
|
1182
|
+
"def": "PRIMARY KEY (blueprint_node_id)",
|
|
1183
|
+
"table": "artifact_standard_blueprint_nodes",
|
|
1184
|
+
"columns": [
|
|
1185
|
+
"blueprint_node_id"
|
|
1186
|
+
]
|
|
1187
|
+
},
|
|
1188
|
+
{
|
|
1189
|
+
"name": "-",
|
|
1190
|
+
"type": "CHECK",
|
|
1191
|
+
"def": "CHECK (length(blueprint_node_id) = 36)",
|
|
1192
|
+
"table": "artifact_standard_blueprint_nodes",
|
|
1193
|
+
"columns": [
|
|
1194
|
+
"blueprint_node_id"
|
|
1195
|
+
]
|
|
1196
|
+
},
|
|
1197
|
+
{
|
|
1198
|
+
"name": "-",
|
|
1199
|
+
"type": "CHECK",
|
|
1200
|
+
"def": "CHECK (length(blueprint_id) = 36)",
|
|
1201
|
+
"table": "artifact_standard_blueprint_nodes",
|
|
1202
|
+
"columns": [
|
|
1203
|
+
"blueprint_id"
|
|
1204
|
+
]
|
|
1205
|
+
},
|
|
1206
|
+
{
|
|
1207
|
+
"name": "-",
|
|
1208
|
+
"type": "CHECK",
|
|
1209
|
+
"def": "CHECK (parent_blueprint_node_id IS NULL OR length(parent_blueprint_node_id) = 36)",
|
|
1210
|
+
"table": "artifact_standard_blueprint_nodes",
|
|
1211
|
+
"columns": [
|
|
1212
|
+
"blueprint_node_id",
|
|
1213
|
+
"parent_blueprint_node_id"
|
|
1214
|
+
]
|
|
1215
|
+
},
|
|
1216
|
+
{
|
|
1217
|
+
"name": "-",
|
|
1218
|
+
"type": "CHECK",
|
|
1219
|
+
"def": "CHECK (node_level \u003e= 1)",
|
|
1220
|
+
"table": "artifact_standard_blueprint_nodes",
|
|
1221
|
+
"columns": [
|
|
1222
|
+
"node_level"
|
|
1223
|
+
]
|
|
1224
|
+
},
|
|
1225
|
+
{
|
|
1226
|
+
"name": "-",
|
|
1227
|
+
"type": "CHECK",
|
|
1228
|
+
"def": "CHECK (toc_visible IN (0, 1))",
|
|
1229
|
+
"table": "artifact_standard_blueprint_nodes",
|
|
1230
|
+
"columns": [
|
|
1231
|
+
"toc_visible"
|
|
1232
|
+
]
|
|
1233
|
+
},
|
|
1234
|
+
{
|
|
1235
|
+
"name": "-",
|
|
1236
|
+
"type": "CHECK",
|
|
1237
|
+
"def": "CHECK (is_required IN (0, 1))",
|
|
1238
|
+
"table": "artifact_standard_blueprint_nodes",
|
|
1239
|
+
"columns": [
|
|
1240
|
+
"is_required"
|
|
1241
|
+
]
|
|
1242
|
+
},
|
|
1243
|
+
{
|
|
1244
|
+
"name": "-",
|
|
1245
|
+
"type": "CHECK",
|
|
1246
|
+
"def": "CHECK (is_repeatable IN (0, 1))",
|
|
1247
|
+
"table": "artifact_standard_blueprint_nodes",
|
|
1248
|
+
"columns": [
|
|
1249
|
+
"is_repeatable"
|
|
1250
|
+
]
|
|
1251
|
+
},
|
|
1252
|
+
{
|
|
1253
|
+
"name": "-",
|
|
1254
|
+
"type": "CHECK",
|
|
1255
|
+
"def": "CHECK (metadata_json IS NULL OR json_valid(metadata_json))",
|
|
1256
|
+
"table": "artifact_standard_blueprint_nodes",
|
|
1257
|
+
"columns": [
|
|
1258
|
+
"metadata_json"
|
|
1259
|
+
]
|
|
1260
|
+
}
|
|
1261
|
+
],
|
|
1262
|
+
"def": "CREATE TABLE artifact_standard_blueprint_nodes (\n -- blueprint node 식별자\n blueprint_node_id CHAR(36) PRIMARY KEY\n CHECK (length(blueprint_node_id) = 36),\n\n -- 소속 blueprint 식별자\n blueprint_id CHAR(36) NOT NULL\n CHECK (length(blueprint_id) = 36),\n\n -- 부모 blueprint node 식별자\n parent_blueprint_node_id CHAR(36)\n CHECK (parent_blueprint_node_id IS NULL OR length(parent_blueprint_node_id) = 36),\n\n -- node 코드\n node_code VARCHAR(128) NOT NULL,\n\n -- node 제목\n node_title VARCHAR(256) NOT NULL,\n\n -- node 유형 코드\n node_type_code VARCHAR(64) NOT NULL DEFAULT 'BODY',\n\n -- node level. ToC level 또는 논리 section level로 사용한다.\n node_level INTEGER NOT NULL DEFAULT 1\n CHECK (node_level \u003e= 1),\n\n -- 목차 표시 여부\n toc_visible INTEGER NOT NULL DEFAULT 1\n CHECK (toc_visible IN (0, 1)),\n\n -- 필수 여부\n is_required INTEGER NOT NULL DEFAULT 1\n CHECK (is_required IN (0, 1)),\n\n -- 반복 가능 여부\n is_repeatable INTEGER NOT NULL DEFAULT 0\n CHECK (is_repeatable IN (0, 1)),\n\n -- 반복 context 코드\n repeat_context_code VARCHAR(128),\n\n -- document taxonomy 또는 node type 참조\n taxonomy_ref VARCHAR(256),\n\n -- 설명\n description TEXT,\n\n -- 표시 정렬 순서\n sort_order INTEGER NOT NULL DEFAULT 0,\n\n -- 생성 시각\n created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 수정 시각\n updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 확장 메타데이터\n metadata_json JSON\n CHECK (metadata_json IS NULL OR json_valid(metadata_json)),\n\n FOREIGN KEY (blueprint_id)\n REFERENCES artifact_standard_document_blueprints (blueprint_id)\n ON DELETE CASCADE,\n\n FOREIGN KEY (parent_blueprint_node_id)\n REFERENCES artifact_standard_blueprint_nodes (blueprint_node_id)\n ON DELETE CASCADE,\n\n UNIQUE (blueprint_id, node_code)\n)"
|
|
1263
|
+
},
|
|
1264
|
+
{
|
|
1265
|
+
"name": "artifact_standard_template_slots",
|
|
1266
|
+
"type": "table",
|
|
1267
|
+
"comment": "blueprint 내 section, table, figure, diagram 등이 들어갈 slot을 관리한다.",
|
|
1268
|
+
"columns": [
|
|
1269
|
+
{
|
|
1270
|
+
"name": "template_slot_id",
|
|
1271
|
+
"type": "CHAR(36)",
|
|
1272
|
+
"nullable": true
|
|
1273
|
+
},
|
|
1274
|
+
{
|
|
1275
|
+
"name": "blueprint_id",
|
|
1276
|
+
"type": "CHAR(36)",
|
|
1277
|
+
"nullable": false
|
|
1278
|
+
},
|
|
1279
|
+
{
|
|
1280
|
+
"name": "blueprint_node_id",
|
|
1281
|
+
"type": "CHAR(36)",
|
|
1282
|
+
"nullable": true
|
|
1283
|
+
},
|
|
1284
|
+
{
|
|
1285
|
+
"name": "parent_template_slot_id",
|
|
1286
|
+
"type": "CHAR(36)",
|
|
1287
|
+
"nullable": true
|
|
1288
|
+
},
|
|
1289
|
+
{
|
|
1290
|
+
"name": "slot_code",
|
|
1291
|
+
"type": "VARCHAR(128)",
|
|
1292
|
+
"nullable": false
|
|
1293
|
+
},
|
|
1294
|
+
{
|
|
1295
|
+
"name": "slot_name",
|
|
1296
|
+
"type": "VARCHAR(256)",
|
|
1297
|
+
"nullable": false
|
|
1298
|
+
},
|
|
1299
|
+
{
|
|
1300
|
+
"name": "slot_type_code",
|
|
1301
|
+
"type": "VARCHAR(64)",
|
|
1302
|
+
"nullable": false
|
|
1303
|
+
},
|
|
1304
|
+
{
|
|
1305
|
+
"name": "block_type_code",
|
|
1306
|
+
"type": "VARCHAR(64)",
|
|
1307
|
+
"nullable": true
|
|
1308
|
+
},
|
|
1309
|
+
{
|
|
1310
|
+
"name": "is_required",
|
|
1311
|
+
"type": "INTEGER",
|
|
1312
|
+
"nullable": false,
|
|
1313
|
+
"default": "1"
|
|
1314
|
+
},
|
|
1315
|
+
{
|
|
1316
|
+
"name": "is_repeatable",
|
|
1317
|
+
"type": "INTEGER",
|
|
1318
|
+
"nullable": false,
|
|
1319
|
+
"default": "0"
|
|
1320
|
+
},
|
|
1321
|
+
{
|
|
1322
|
+
"name": "repeat_context_code",
|
|
1323
|
+
"type": "VARCHAR(128)",
|
|
1324
|
+
"nullable": true
|
|
1325
|
+
},
|
|
1326
|
+
{
|
|
1327
|
+
"name": "schema_ref",
|
|
1328
|
+
"type": "VARCHAR(256)",
|
|
1329
|
+
"nullable": true
|
|
1330
|
+
},
|
|
1331
|
+
{
|
|
1332
|
+
"name": "description",
|
|
1333
|
+
"type": "TEXT",
|
|
1334
|
+
"nullable": true
|
|
1335
|
+
},
|
|
1336
|
+
{
|
|
1337
|
+
"name": "sort_order",
|
|
1338
|
+
"type": "INTEGER",
|
|
1339
|
+
"nullable": false,
|
|
1340
|
+
"default": "0"
|
|
1341
|
+
},
|
|
1342
|
+
{
|
|
1343
|
+
"name": "created_at",
|
|
1344
|
+
"type": "DATETIME",
|
|
1345
|
+
"nullable": false,
|
|
1346
|
+
"default": "CURRENT_TIMESTAMP"
|
|
1347
|
+
},
|
|
1348
|
+
{
|
|
1349
|
+
"name": "updated_at",
|
|
1350
|
+
"type": "DATETIME",
|
|
1351
|
+
"nullable": false,
|
|
1352
|
+
"default": "CURRENT_TIMESTAMP"
|
|
1353
|
+
},
|
|
1354
|
+
{
|
|
1355
|
+
"name": "metadata_json",
|
|
1356
|
+
"type": "JSON",
|
|
1357
|
+
"nullable": true
|
|
1358
|
+
}
|
|
1359
|
+
],
|
|
1360
|
+
"indexes": [
|
|
1361
|
+
{
|
|
1362
|
+
"name": "idx_artifact_standard_template_slots_node",
|
|
1363
|
+
"def": "CREATE INDEX idx_artifact_standard_template_slots_node\n ON artifact_standard_template_slots (blueprint_node_id)",
|
|
1364
|
+
"table": "artifact_standard_template_slots",
|
|
1365
|
+
"columns": [
|
|
1366
|
+
"blueprint_node_id"
|
|
1367
|
+
]
|
|
1368
|
+
},
|
|
1369
|
+
{
|
|
1370
|
+
"name": "idx_artifact_standard_template_slots_blueprint",
|
|
1371
|
+
"def": "CREATE INDEX idx_artifact_standard_template_slots_blueprint\n ON artifact_standard_template_slots (blueprint_id)",
|
|
1372
|
+
"table": "artifact_standard_template_slots",
|
|
1373
|
+
"columns": [
|
|
1374
|
+
"blueprint_id"
|
|
1375
|
+
]
|
|
1376
|
+
},
|
|
1377
|
+
{
|
|
1378
|
+
"name": "sqlite_autoindex_artifact_standard_template_slots_2",
|
|
1379
|
+
"def": "UNIQUE (blueprint_id, slot_code)",
|
|
1380
|
+
"table": "artifact_standard_template_slots",
|
|
1381
|
+
"columns": [
|
|
1382
|
+
"blueprint_id",
|
|
1383
|
+
"slot_code"
|
|
1384
|
+
]
|
|
1385
|
+
},
|
|
1386
|
+
{
|
|
1387
|
+
"name": "sqlite_autoindex_artifact_standard_template_slots_1",
|
|
1388
|
+
"def": "PRIMARY KEY (template_slot_id)",
|
|
1389
|
+
"table": "artifact_standard_template_slots",
|
|
1390
|
+
"columns": [
|
|
1391
|
+
"template_slot_id"
|
|
1392
|
+
]
|
|
1393
|
+
}
|
|
1394
|
+
],
|
|
1395
|
+
"constraints": [
|
|
1396
|
+
{
|
|
1397
|
+
"name": "template_slot_id",
|
|
1398
|
+
"type": "PRIMARY KEY",
|
|
1399
|
+
"def": "PRIMARY KEY (template_slot_id)",
|
|
1400
|
+
"table": "artifact_standard_template_slots",
|
|
1401
|
+
"columns": [
|
|
1402
|
+
"template_slot_id"
|
|
1403
|
+
]
|
|
1404
|
+
},
|
|
1405
|
+
{
|
|
1406
|
+
"name": "- (Foreign key ID: 0)",
|
|
1407
|
+
"type": "FOREIGN KEY",
|
|
1408
|
+
"def": "FOREIGN KEY (parent_template_slot_id) REFERENCES artifact_standard_template_slots (template_slot_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE",
|
|
1409
|
+
"table": "artifact_standard_template_slots",
|
|
1410
|
+
"referenced_table": "artifact_standard_template_slots",
|
|
1411
|
+
"columns": [
|
|
1412
|
+
"parent_template_slot_id"
|
|
1413
|
+
],
|
|
1414
|
+
"referenced_columns": [
|
|
1415
|
+
"template_slot_id"
|
|
1416
|
+
]
|
|
1417
|
+
},
|
|
1418
|
+
{
|
|
1419
|
+
"name": "- (Foreign key ID: 1)",
|
|
1420
|
+
"type": "FOREIGN KEY",
|
|
1421
|
+
"def": "FOREIGN KEY (blueprint_node_id) REFERENCES artifact_standard_blueprint_nodes (blueprint_node_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE",
|
|
1422
|
+
"table": "artifact_standard_template_slots",
|
|
1423
|
+
"referenced_table": "artifact_standard_blueprint_nodes",
|
|
1424
|
+
"columns": [
|
|
1425
|
+
"blueprint_node_id"
|
|
1426
|
+
],
|
|
1427
|
+
"referenced_columns": [
|
|
1428
|
+
"blueprint_node_id"
|
|
1429
|
+
]
|
|
1430
|
+
},
|
|
1431
|
+
{
|
|
1432
|
+
"name": "- (Foreign key ID: 2)",
|
|
1433
|
+
"type": "FOREIGN KEY",
|
|
1434
|
+
"def": "FOREIGN KEY (blueprint_id) REFERENCES artifact_standard_document_blueprints (blueprint_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE",
|
|
1435
|
+
"table": "artifact_standard_template_slots",
|
|
1436
|
+
"referenced_table": "artifact_standard_document_blueprints",
|
|
1437
|
+
"columns": [
|
|
1438
|
+
"blueprint_id"
|
|
1439
|
+
],
|
|
1440
|
+
"referenced_columns": [
|
|
1441
|
+
"blueprint_id"
|
|
1442
|
+
]
|
|
1443
|
+
},
|
|
1444
|
+
{
|
|
1445
|
+
"name": "sqlite_autoindex_artifact_standard_template_slots_2",
|
|
1446
|
+
"type": "UNIQUE",
|
|
1447
|
+
"def": "UNIQUE (blueprint_id, slot_code)",
|
|
1448
|
+
"table": "artifact_standard_template_slots",
|
|
1449
|
+
"columns": [
|
|
1450
|
+
"blueprint_id",
|
|
1451
|
+
"slot_code"
|
|
1452
|
+
]
|
|
1453
|
+
},
|
|
1454
|
+
{
|
|
1455
|
+
"name": "sqlite_autoindex_artifact_standard_template_slots_1",
|
|
1456
|
+
"type": "PRIMARY KEY",
|
|
1457
|
+
"def": "PRIMARY KEY (template_slot_id)",
|
|
1458
|
+
"table": "artifact_standard_template_slots",
|
|
1459
|
+
"columns": [
|
|
1460
|
+
"template_slot_id"
|
|
1461
|
+
]
|
|
1462
|
+
},
|
|
1463
|
+
{
|
|
1464
|
+
"name": "-",
|
|
1465
|
+
"type": "CHECK",
|
|
1466
|
+
"def": "CHECK (length(template_slot_id) = 36)",
|
|
1467
|
+
"table": "artifact_standard_template_slots",
|
|
1468
|
+
"columns": [
|
|
1469
|
+
"template_slot_id"
|
|
1470
|
+
]
|
|
1471
|
+
},
|
|
1472
|
+
{
|
|
1473
|
+
"name": "-",
|
|
1474
|
+
"type": "CHECK",
|
|
1475
|
+
"def": "CHECK (length(blueprint_id) = 36)",
|
|
1476
|
+
"table": "artifact_standard_template_slots",
|
|
1477
|
+
"columns": [
|
|
1478
|
+
"blueprint_id"
|
|
1479
|
+
]
|
|
1480
|
+
},
|
|
1481
|
+
{
|
|
1482
|
+
"name": "-",
|
|
1483
|
+
"type": "CHECK",
|
|
1484
|
+
"def": "CHECK (blueprint_node_id IS NULL OR length(blueprint_node_id) = 36)",
|
|
1485
|
+
"table": "artifact_standard_template_slots",
|
|
1486
|
+
"columns": [
|
|
1487
|
+
"blueprint_node_id"
|
|
1488
|
+
]
|
|
1489
|
+
},
|
|
1490
|
+
{
|
|
1491
|
+
"name": "-",
|
|
1492
|
+
"type": "CHECK",
|
|
1493
|
+
"def": "CHECK (parent_template_slot_id IS NULL OR length(parent_template_slot_id) = 36)",
|
|
1494
|
+
"table": "artifact_standard_template_slots",
|
|
1495
|
+
"columns": [
|
|
1496
|
+
"template_slot_id",
|
|
1497
|
+
"parent_template_slot_id"
|
|
1498
|
+
]
|
|
1499
|
+
},
|
|
1500
|
+
{
|
|
1501
|
+
"name": "-",
|
|
1502
|
+
"type": "CHECK",
|
|
1503
|
+
"def": "CHECK (is_required IN (0, 1))",
|
|
1504
|
+
"table": "artifact_standard_template_slots",
|
|
1505
|
+
"columns": [
|
|
1506
|
+
"is_required"
|
|
1507
|
+
]
|
|
1508
|
+
},
|
|
1509
|
+
{
|
|
1510
|
+
"name": "-",
|
|
1511
|
+
"type": "CHECK",
|
|
1512
|
+
"def": "CHECK (is_repeatable IN (0, 1))",
|
|
1513
|
+
"table": "artifact_standard_template_slots",
|
|
1514
|
+
"columns": [
|
|
1515
|
+
"is_repeatable"
|
|
1516
|
+
]
|
|
1517
|
+
},
|
|
1518
|
+
{
|
|
1519
|
+
"name": "-",
|
|
1520
|
+
"type": "CHECK",
|
|
1521
|
+
"def": "CHECK (metadata_json IS NULL OR json_valid(metadata_json))",
|
|
1522
|
+
"table": "artifact_standard_template_slots",
|
|
1523
|
+
"columns": [
|
|
1524
|
+
"metadata_json"
|
|
1525
|
+
]
|
|
1526
|
+
}
|
|
1527
|
+
],
|
|
1528
|
+
"def": "CREATE TABLE artifact_standard_template_slots (\n -- slot 식별자\n template_slot_id CHAR(36) PRIMARY KEY\n CHECK (length(template_slot_id) = 36),\n\n -- 소속 blueprint 식별자\n blueprint_id CHAR(36) NOT NULL\n CHECK (length(blueprint_id) = 36),\n\n -- 소속 blueprint node 식별자\n blueprint_node_id CHAR(36)\n CHECK (blueprint_node_id IS NULL OR length(blueprint_node_id) = 36),\n\n -- 부모 slot 식별자\n parent_template_slot_id CHAR(36)\n CHECK (parent_template_slot_id IS NULL OR length(parent_template_slot_id) = 36),\n\n -- slot 코드\n slot_code VARCHAR(128) NOT NULL,\n\n -- slot 이름\n slot_name VARCHAR(256) NOT NULL,\n\n -- slot 유형 코드\n slot_type_code VARCHAR(64) NOT NULL,\n\n -- block 유형 코드\n block_type_code VARCHAR(64),\n\n -- slot 필수 여부\n is_required INTEGER NOT NULL DEFAULT 1\n CHECK (is_required IN (0, 1)),\n\n -- 반복 가능 여부\n is_repeatable INTEGER NOT NULL DEFAULT 0\n CHECK (is_repeatable IN (0, 1)),\n\n -- 반복 context 코드\n repeat_context_code VARCHAR(128),\n\n -- schema 참조\n schema_ref VARCHAR(256),\n\n -- 설명\n description TEXT,\n\n -- 표시 정렬 순서\n sort_order INTEGER NOT NULL DEFAULT 0,\n\n -- 생성 시각\n created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 수정 시각\n updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 확장 메타데이터\n metadata_json JSON\n CHECK (metadata_json IS NULL OR json_valid(metadata_json)),\n\n FOREIGN KEY (blueprint_id)\n REFERENCES artifact_standard_document_blueprints (blueprint_id)\n ON DELETE CASCADE,\n\n FOREIGN KEY (blueprint_node_id)\n REFERENCES artifact_standard_blueprint_nodes (blueprint_node_id)\n ON DELETE CASCADE,\n\n FOREIGN KEY (parent_template_slot_id)\n REFERENCES artifact_standard_template_slots (template_slot_id)\n ON DELETE CASCADE,\n\n UNIQUE (blueprint_id, slot_code)\n)"
|
|
1529
|
+
},
|
|
1530
|
+
{
|
|
1531
|
+
"name": "artifact_standard_document_components",
|
|
1532
|
+
"type": "table",
|
|
1533
|
+
"columns": [
|
|
1534
|
+
{
|
|
1535
|
+
"name": "document_component_id",
|
|
1536
|
+
"type": "CHAR(36)",
|
|
1537
|
+
"nullable": true
|
|
1538
|
+
},
|
|
1539
|
+
{
|
|
1540
|
+
"name": "artifact_standard_id",
|
|
1541
|
+
"type": "CHAR(36)",
|
|
1542
|
+
"nullable": false
|
|
1543
|
+
},
|
|
1544
|
+
{
|
|
1545
|
+
"name": "blueprint_id",
|
|
1546
|
+
"type": "CHAR(36)",
|
|
1547
|
+
"nullable": true
|
|
1548
|
+
},
|
|
1549
|
+
{
|
|
1550
|
+
"name": "parent_document_component_id",
|
|
1551
|
+
"type": "CHAR(36)",
|
|
1552
|
+
"nullable": true
|
|
1553
|
+
},
|
|
1554
|
+
{
|
|
1555
|
+
"name": "document_component_code",
|
|
1556
|
+
"type": "VARCHAR(128)",
|
|
1557
|
+
"nullable": false
|
|
1558
|
+
},
|
|
1559
|
+
{
|
|
1560
|
+
"name": "document_component_name",
|
|
1561
|
+
"type": "VARCHAR(256)",
|
|
1562
|
+
"nullable": false
|
|
1563
|
+
},
|
|
1564
|
+
{
|
|
1565
|
+
"name": "component_role_code",
|
|
1566
|
+
"type": "VARCHAR(64)",
|
|
1567
|
+
"nullable": false,
|
|
1568
|
+
"default": "'MAIN'"
|
|
1569
|
+
},
|
|
1570
|
+
{
|
|
1571
|
+
"name": "component_type_code",
|
|
1572
|
+
"type": "VARCHAR(128)",
|
|
1573
|
+
"nullable": false
|
|
1574
|
+
},
|
|
1575
|
+
{
|
|
1576
|
+
"name": "representation_code",
|
|
1577
|
+
"type": "VARCHAR(64)",
|
|
1578
|
+
"nullable": false,
|
|
1579
|
+
"default": "'SEPARATE_DOCUMENT'"
|
|
1580
|
+
},
|
|
1581
|
+
{
|
|
1582
|
+
"name": "logical_level",
|
|
1583
|
+
"type": "INTEGER",
|
|
1584
|
+
"nullable": false,
|
|
1585
|
+
"default": "0"
|
|
1586
|
+
},
|
|
1587
|
+
{
|
|
1588
|
+
"name": "is_required",
|
|
1589
|
+
"type": "INTEGER",
|
|
1590
|
+
"nullable": false,
|
|
1591
|
+
"default": "1"
|
|
1592
|
+
},
|
|
1593
|
+
{
|
|
1594
|
+
"name": "is_repeatable",
|
|
1595
|
+
"type": "INTEGER",
|
|
1596
|
+
"nullable": false,
|
|
1597
|
+
"default": "0"
|
|
1598
|
+
},
|
|
1599
|
+
{
|
|
1600
|
+
"name": "sort_order",
|
|
1601
|
+
"type": "INTEGER",
|
|
1602
|
+
"nullable": false,
|
|
1603
|
+
"default": "0"
|
|
1604
|
+
},
|
|
1605
|
+
{
|
|
1606
|
+
"name": "description",
|
|
1607
|
+
"type": "TEXT",
|
|
1608
|
+
"nullable": true
|
|
1609
|
+
},
|
|
1610
|
+
{
|
|
1611
|
+
"name": "created_at",
|
|
1612
|
+
"type": "DATETIME",
|
|
1613
|
+
"nullable": false,
|
|
1614
|
+
"default": "CURRENT_TIMESTAMP"
|
|
1615
|
+
},
|
|
1616
|
+
{
|
|
1617
|
+
"name": "updated_at",
|
|
1618
|
+
"type": "DATETIME",
|
|
1619
|
+
"nullable": false,
|
|
1620
|
+
"default": "CURRENT_TIMESTAMP"
|
|
1621
|
+
},
|
|
1622
|
+
{
|
|
1623
|
+
"name": "metadata_json",
|
|
1624
|
+
"type": "JSON",
|
|
1625
|
+
"nullable": true
|
|
1626
|
+
}
|
|
1627
|
+
],
|
|
1628
|
+
"indexes": [
|
|
1629
|
+
{
|
|
1630
|
+
"name": "idx_artifact_standard_document_components_role_type",
|
|
1631
|
+
"def": "CREATE INDEX idx_artifact_standard_document_components_role_type\n ON artifact_standard_document_components (artifact_standard_id, component_role_code, component_type_code)",
|
|
1632
|
+
"table": "artifact_standard_document_components",
|
|
1633
|
+
"columns": [
|
|
1634
|
+
"artifact_standard_id",
|
|
1635
|
+
"component_role_code",
|
|
1636
|
+
"component_type_code"
|
|
1637
|
+
]
|
|
1638
|
+
},
|
|
1639
|
+
{
|
|
1640
|
+
"name": "idx_artifact_standard_document_components_parent",
|
|
1641
|
+
"def": "CREATE INDEX idx_artifact_standard_document_components_parent\n ON artifact_standard_document_components (parent_document_component_id)",
|
|
1642
|
+
"table": "artifact_standard_document_components",
|
|
1643
|
+
"columns": [
|
|
1644
|
+
"parent_document_component_id"
|
|
1645
|
+
]
|
|
1646
|
+
},
|
|
1647
|
+
{
|
|
1648
|
+
"name": "idx_artifact_standard_document_components_standard",
|
|
1649
|
+
"def": "CREATE INDEX idx_artifact_standard_document_components_standard\n ON artifact_standard_document_components (artifact_standard_id)",
|
|
1650
|
+
"table": "artifact_standard_document_components",
|
|
1651
|
+
"columns": [
|
|
1652
|
+
"artifact_standard_id"
|
|
1653
|
+
]
|
|
1654
|
+
},
|
|
1655
|
+
{
|
|
1656
|
+
"name": "sqlite_autoindex_artifact_standard_document_components_2",
|
|
1657
|
+
"def": "UNIQUE (artifact_standard_id, document_component_code)",
|
|
1658
|
+
"table": "artifact_standard_document_components",
|
|
1659
|
+
"columns": [
|
|
1660
|
+
"artifact_standard_id",
|
|
1661
|
+
"document_component_code"
|
|
1662
|
+
]
|
|
1663
|
+
},
|
|
1664
|
+
{
|
|
1665
|
+
"name": "sqlite_autoindex_artifact_standard_document_components_1",
|
|
1666
|
+
"def": "PRIMARY KEY (document_component_id)",
|
|
1667
|
+
"table": "artifact_standard_document_components",
|
|
1668
|
+
"columns": [
|
|
1669
|
+
"document_component_id"
|
|
1670
|
+
]
|
|
1671
|
+
}
|
|
1672
|
+
],
|
|
1673
|
+
"constraints": [
|
|
1674
|
+
{
|
|
1675
|
+
"name": "document_component_id",
|
|
1676
|
+
"type": "PRIMARY KEY",
|
|
1677
|
+
"def": "PRIMARY KEY (document_component_id)",
|
|
1678
|
+
"table": "artifact_standard_document_components",
|
|
1679
|
+
"columns": [
|
|
1680
|
+
"document_component_id"
|
|
1681
|
+
]
|
|
1682
|
+
},
|
|
1683
|
+
{
|
|
1684
|
+
"name": "- (Foreign key ID: 0)",
|
|
1685
|
+
"type": "FOREIGN KEY",
|
|
1686
|
+
"def": "FOREIGN KEY (parent_document_component_id) REFERENCES artifact_standard_document_components (document_component_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE",
|
|
1687
|
+
"table": "artifact_standard_document_components",
|
|
1688
|
+
"referenced_table": "artifact_standard_document_components",
|
|
1689
|
+
"columns": [
|
|
1690
|
+
"parent_document_component_id"
|
|
1691
|
+
],
|
|
1692
|
+
"referenced_columns": [
|
|
1693
|
+
"document_component_id"
|
|
1694
|
+
]
|
|
1695
|
+
},
|
|
1696
|
+
{
|
|
1697
|
+
"name": "- (Foreign key ID: 1)",
|
|
1698
|
+
"type": "FOREIGN KEY",
|
|
1699
|
+
"def": "FOREIGN KEY (blueprint_id) REFERENCES artifact_standard_document_blueprints (blueprint_id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE",
|
|
1700
|
+
"table": "artifact_standard_document_components",
|
|
1701
|
+
"referenced_table": "artifact_standard_document_blueprints",
|
|
1702
|
+
"columns": [
|
|
1703
|
+
"blueprint_id"
|
|
1704
|
+
],
|
|
1705
|
+
"referenced_columns": [
|
|
1706
|
+
"blueprint_id"
|
|
1707
|
+
]
|
|
1708
|
+
},
|
|
1709
|
+
{
|
|
1710
|
+
"name": "- (Foreign key ID: 2)",
|
|
1711
|
+
"type": "FOREIGN KEY",
|
|
1712
|
+
"def": "FOREIGN KEY (artifact_standard_id) REFERENCES artifact_standard_standards (artifact_standard_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE",
|
|
1713
|
+
"table": "artifact_standard_document_components",
|
|
1714
|
+
"referenced_table": "artifact_standard_standards",
|
|
1715
|
+
"columns": [
|
|
1716
|
+
"artifact_standard_id"
|
|
1717
|
+
],
|
|
1718
|
+
"referenced_columns": [
|
|
1719
|
+
"artifact_standard_id"
|
|
1720
|
+
]
|
|
1721
|
+
},
|
|
1722
|
+
{
|
|
1723
|
+
"name": "sqlite_autoindex_artifact_standard_document_components_2",
|
|
1724
|
+
"type": "UNIQUE",
|
|
1725
|
+
"def": "UNIQUE (artifact_standard_id, document_component_code)",
|
|
1726
|
+
"table": "artifact_standard_document_components",
|
|
1727
|
+
"columns": [
|
|
1728
|
+
"artifact_standard_id",
|
|
1729
|
+
"document_component_code"
|
|
1730
|
+
]
|
|
1731
|
+
},
|
|
1732
|
+
{
|
|
1733
|
+
"name": "sqlite_autoindex_artifact_standard_document_components_1",
|
|
1734
|
+
"type": "PRIMARY KEY",
|
|
1735
|
+
"def": "PRIMARY KEY (document_component_id)",
|
|
1736
|
+
"table": "artifact_standard_document_components",
|
|
1737
|
+
"columns": [
|
|
1738
|
+
"document_component_id"
|
|
1739
|
+
]
|
|
1740
|
+
},
|
|
1741
|
+
{
|
|
1742
|
+
"name": "-",
|
|
1743
|
+
"type": "CHECK",
|
|
1744
|
+
"def": "CHECK (length(document_component_id) = 36)",
|
|
1745
|
+
"table": "artifact_standard_document_components",
|
|
1746
|
+
"columns": [
|
|
1747
|
+
"document_component_id"
|
|
1748
|
+
]
|
|
1749
|
+
},
|
|
1750
|
+
{
|
|
1751
|
+
"name": "-",
|
|
1752
|
+
"type": "CHECK",
|
|
1753
|
+
"def": "CHECK (length(artifact_standard_id) = 36)",
|
|
1754
|
+
"table": "artifact_standard_document_components",
|
|
1755
|
+
"columns": [
|
|
1756
|
+
"artifact_standard_id"
|
|
1757
|
+
]
|
|
1758
|
+
},
|
|
1759
|
+
{
|
|
1760
|
+
"name": "-",
|
|
1761
|
+
"type": "CHECK",
|
|
1762
|
+
"def": "CHECK (blueprint_id IS NULL OR length(blueprint_id) = 36)",
|
|
1763
|
+
"table": "artifact_standard_document_components",
|
|
1764
|
+
"columns": [
|
|
1765
|
+
"blueprint_id"
|
|
1766
|
+
]
|
|
1767
|
+
},
|
|
1768
|
+
{
|
|
1769
|
+
"name": "-",
|
|
1770
|
+
"type": "CHECK",
|
|
1771
|
+
"def": "CHECK (parent_document_component_id IS NULL OR length(parent_document_component_id) = 36)",
|
|
1772
|
+
"table": "artifact_standard_document_components",
|
|
1773
|
+
"columns": [
|
|
1774
|
+
"document_component_id",
|
|
1775
|
+
"parent_document_component_id"
|
|
1776
|
+
]
|
|
1777
|
+
},
|
|
1778
|
+
{
|
|
1779
|
+
"name": "-",
|
|
1780
|
+
"type": "CHECK",
|
|
1781
|
+
"def": "CHECK (component_role_code IN ('MAIN', 'APPENDIX', 'SUPPORTING', 'CONTROL'))",
|
|
1782
|
+
"table": "artifact_standard_document_components",
|
|
1783
|
+
"columns": [
|
|
1784
|
+
"component_role_code"
|
|
1785
|
+
]
|
|
1786
|
+
},
|
|
1787
|
+
{
|
|
1788
|
+
"name": "-",
|
|
1789
|
+
"type": "CHECK",
|
|
1790
|
+
"def": "CHECK (representation_code IN ('INTERNAL_NODE', 'SEPARATE_DOCUMENT'))",
|
|
1791
|
+
"table": "artifact_standard_document_components",
|
|
1792
|
+
"columns": [
|
|
1793
|
+
"representation_code"
|
|
1794
|
+
]
|
|
1795
|
+
},
|
|
1796
|
+
{
|
|
1797
|
+
"name": "-",
|
|
1798
|
+
"type": "CHECK",
|
|
1799
|
+
"def": "CHECK (logical_level \u003e= 0)",
|
|
1800
|
+
"table": "artifact_standard_document_components",
|
|
1801
|
+
"columns": [
|
|
1802
|
+
"logical_level"
|
|
1803
|
+
]
|
|
1804
|
+
},
|
|
1805
|
+
{
|
|
1806
|
+
"name": "-",
|
|
1807
|
+
"type": "CHECK",
|
|
1808
|
+
"def": "CHECK (is_required IN (0, 1))",
|
|
1809
|
+
"table": "artifact_standard_document_components",
|
|
1810
|
+
"columns": [
|
|
1811
|
+
"is_required"
|
|
1812
|
+
]
|
|
1813
|
+
},
|
|
1814
|
+
{
|
|
1815
|
+
"name": "-",
|
|
1816
|
+
"type": "CHECK",
|
|
1817
|
+
"def": "CHECK (is_repeatable IN (0, 1))",
|
|
1818
|
+
"table": "artifact_standard_document_components",
|
|
1819
|
+
"columns": [
|
|
1820
|
+
"is_repeatable"
|
|
1821
|
+
]
|
|
1822
|
+
},
|
|
1823
|
+
{
|
|
1824
|
+
"name": "-",
|
|
1825
|
+
"type": "CHECK",
|
|
1826
|
+
"def": "CHECK (metadata_json IS NULL OR json_valid(metadata_json))",
|
|
1827
|
+
"table": "artifact_standard_document_components",
|
|
1828
|
+
"columns": [
|
|
1829
|
+
"metadata_json"
|
|
1830
|
+
]
|
|
1831
|
+
}
|
|
1832
|
+
],
|
|
1833
|
+
"def": "CREATE TABLE artifact_standard_document_components (\n -- document component 식별자\n document_component_id CHAR(36) PRIMARY KEY\n CHECK (length(document_component_id) = 36),\n\n -- 소속 산출물 표준 식별자\n artifact_standard_id CHAR(36) NOT NULL\n CHECK (length(artifact_standard_id) = 36),\n\n -- 관련 blueprint 식별자\n blueprint_id CHAR(36)\n CHECK (blueprint_id IS NULL OR length(blueprint_id) = 36),\n\n -- 부모 document component 식별자\n parent_document_component_id CHAR(36)\n CHECK (parent_document_component_id IS NULL OR length(parent_document_component_id) = 36),\n\n -- document component 코드\n document_component_code VARCHAR(128) NOT NULL,\n\n -- document component 이름\n document_component_name VARCHAR(256) NOT NULL,\n\n -- component 역할 코드. 본문, 부록, 보조자료, 통제정보 등을 구분한다.\n component_role_code VARCHAR(64) NOT NULL DEFAULT 'MAIN'\n CHECK (component_role_code IN ('MAIN', 'APPENDIX', 'SUPPORTING', 'CONTROL')),\n\n -- component 유형 코드. 산출물 표준별로 정의하는 업무적 유형 코드다.\n component_type_code VARCHAR(128) NOT NULL,\n\n -- 표현 방식 코드. 하나의 document 내부 node인지, 별도 document인지 구분한다.\n representation_code VARCHAR(64) NOT NULL DEFAULT 'SEPARATE_DOCUMENT'\n CHECK (representation_code IN ('INTERNAL_NODE', 'SEPARATE_DOCUMENT')),\n\n -- 논리 계층 level. 물리 폴더 깊이를 의미하지 않는다.\n logical_level INTEGER NOT NULL DEFAULT 0\n CHECK (logical_level \u003e= 0),\n\n -- 필수 여부\n is_required INTEGER NOT NULL DEFAULT 1\n CHECK (is_required IN (0, 1)),\n\n -- 반복 가능 여부\n is_repeatable INTEGER NOT NULL DEFAULT 0\n CHECK (is_repeatable IN (0, 1)),\n\n -- 표시 정렬 순서\n sort_order INTEGER NOT NULL DEFAULT 0,\n\n -- 설명\n description TEXT,\n\n -- 생성 시각\n created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 수정 시각\n updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 확장 메타데이터\n metadata_json JSON\n CHECK (metadata_json IS NULL OR json_valid(metadata_json)),\n\n FOREIGN KEY (artifact_standard_id)\n REFERENCES artifact_standard_standards (artifact_standard_id)\n ON DELETE CASCADE,\n\n FOREIGN KEY (blueprint_id)\n REFERENCES artifact_standard_document_blueprints (blueprint_id)\n ON DELETE SET NULL,\n\n FOREIGN KEY (parent_document_component_id)\n REFERENCES artifact_standard_document_components (document_component_id)\n ON DELETE CASCADE,\n\n UNIQUE (artifact_standard_id, document_component_code)\n)"
|
|
1834
|
+
},
|
|
1835
|
+
{
|
|
1836
|
+
"name": "artifact_standard_document_component_relations",
|
|
1837
|
+
"type": "table",
|
|
1838
|
+
"columns": [
|
|
1839
|
+
{
|
|
1840
|
+
"name": "document_component_relation_id",
|
|
1841
|
+
"type": "CHAR(36)",
|
|
1842
|
+
"nullable": true
|
|
1843
|
+
},
|
|
1844
|
+
{
|
|
1845
|
+
"name": "artifact_standard_id",
|
|
1846
|
+
"type": "CHAR(36)",
|
|
1847
|
+
"nullable": false
|
|
1848
|
+
},
|
|
1849
|
+
{
|
|
1850
|
+
"name": "source_document_component_id",
|
|
1851
|
+
"type": "CHAR(36)",
|
|
1852
|
+
"nullable": false
|
|
1853
|
+
},
|
|
1854
|
+
{
|
|
1855
|
+
"name": "target_document_component_id",
|
|
1856
|
+
"type": "CHAR(36)",
|
|
1857
|
+
"nullable": false
|
|
1858
|
+
},
|
|
1859
|
+
{
|
|
1860
|
+
"name": "relation_type_code",
|
|
1861
|
+
"type": "VARCHAR(64)",
|
|
1862
|
+
"nullable": false
|
|
1863
|
+
},
|
|
1864
|
+
{
|
|
1865
|
+
"name": "is_required",
|
|
1866
|
+
"type": "INTEGER",
|
|
1867
|
+
"nullable": false,
|
|
1868
|
+
"default": "0"
|
|
1869
|
+
},
|
|
1870
|
+
{
|
|
1871
|
+
"name": "sort_order",
|
|
1872
|
+
"type": "INTEGER",
|
|
1873
|
+
"nullable": false,
|
|
1874
|
+
"default": "0"
|
|
1875
|
+
},
|
|
1876
|
+
{
|
|
1877
|
+
"name": "description",
|
|
1878
|
+
"type": "TEXT",
|
|
1879
|
+
"nullable": true
|
|
1880
|
+
},
|
|
1881
|
+
{
|
|
1882
|
+
"name": "created_at",
|
|
1883
|
+
"type": "DATETIME",
|
|
1884
|
+
"nullable": false,
|
|
1885
|
+
"default": "CURRENT_TIMESTAMP"
|
|
1886
|
+
},
|
|
1887
|
+
{
|
|
1888
|
+
"name": "updated_at",
|
|
1889
|
+
"type": "DATETIME",
|
|
1890
|
+
"nullable": false,
|
|
1891
|
+
"default": "CURRENT_TIMESTAMP"
|
|
1892
|
+
},
|
|
1893
|
+
{
|
|
1894
|
+
"name": "metadata_json",
|
|
1895
|
+
"type": "JSON",
|
|
1896
|
+
"nullable": true
|
|
1897
|
+
}
|
|
1898
|
+
],
|
|
1899
|
+
"indexes": [
|
|
1900
|
+
{
|
|
1901
|
+
"name": "idx_artifact_standard_document_component_relations_target",
|
|
1902
|
+
"def": "CREATE INDEX idx_artifact_standard_document_component_relations_target\n ON artifact_standard_document_component_relations (target_document_component_id)",
|
|
1903
|
+
"table": "artifact_standard_document_component_relations",
|
|
1904
|
+
"columns": [
|
|
1905
|
+
"target_document_component_id"
|
|
1906
|
+
]
|
|
1907
|
+
},
|
|
1908
|
+
{
|
|
1909
|
+
"name": "idx_artifact_standard_document_component_relations_source",
|
|
1910
|
+
"def": "CREATE INDEX idx_artifact_standard_document_component_relations_source\n ON artifact_standard_document_component_relations (source_document_component_id)",
|
|
1911
|
+
"table": "artifact_standard_document_component_relations",
|
|
1912
|
+
"columns": [
|
|
1913
|
+
"source_document_component_id"
|
|
1914
|
+
]
|
|
1915
|
+
},
|
|
1916
|
+
{
|
|
1917
|
+
"name": "idx_artifact_standard_document_component_relations_standard",
|
|
1918
|
+
"def": "CREATE INDEX idx_artifact_standard_document_component_relations_standard\n ON artifact_standard_document_component_relations (artifact_standard_id)",
|
|
1919
|
+
"table": "artifact_standard_document_component_relations",
|
|
1920
|
+
"columns": [
|
|
1921
|
+
"artifact_standard_id"
|
|
1922
|
+
]
|
|
1923
|
+
},
|
|
1924
|
+
{
|
|
1925
|
+
"name": "sqlite_autoindex_artifact_standard_document_component_relations_2",
|
|
1926
|
+
"def": "UNIQUE (source_document_component_id, target_document_component_id, relation_type_code)",
|
|
1927
|
+
"table": "artifact_standard_document_component_relations",
|
|
1928
|
+
"columns": [
|
|
1929
|
+
"source_document_component_id",
|
|
1930
|
+
"target_document_component_id",
|
|
1931
|
+
"relation_type_code"
|
|
1932
|
+
]
|
|
1933
|
+
},
|
|
1934
|
+
{
|
|
1935
|
+
"name": "sqlite_autoindex_artifact_standard_document_component_relations_1",
|
|
1936
|
+
"def": "PRIMARY KEY (document_component_relation_id)",
|
|
1937
|
+
"table": "artifact_standard_document_component_relations",
|
|
1938
|
+
"columns": [
|
|
1939
|
+
"document_component_relation_id"
|
|
1940
|
+
]
|
|
1941
|
+
}
|
|
1942
|
+
],
|
|
1943
|
+
"constraints": [
|
|
1944
|
+
{
|
|
1945
|
+
"name": "document_component_relation_id",
|
|
1946
|
+
"type": "PRIMARY KEY",
|
|
1947
|
+
"def": "PRIMARY KEY (document_component_relation_id)",
|
|
1948
|
+
"table": "artifact_standard_document_component_relations",
|
|
1949
|
+
"columns": [
|
|
1950
|
+
"document_component_relation_id"
|
|
1951
|
+
]
|
|
1952
|
+
},
|
|
1953
|
+
{
|
|
1954
|
+
"name": "- (Foreign key ID: 0)",
|
|
1955
|
+
"type": "FOREIGN KEY",
|
|
1956
|
+
"def": "FOREIGN KEY (target_document_component_id) REFERENCES artifact_standard_document_components (document_component_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE",
|
|
1957
|
+
"table": "artifact_standard_document_component_relations",
|
|
1958
|
+
"referenced_table": "artifact_standard_document_components",
|
|
1959
|
+
"columns": [
|
|
1960
|
+
"target_document_component_id"
|
|
1961
|
+
],
|
|
1962
|
+
"referenced_columns": [
|
|
1963
|
+
"document_component_id"
|
|
1964
|
+
]
|
|
1965
|
+
},
|
|
1966
|
+
{
|
|
1967
|
+
"name": "- (Foreign key ID: 1)",
|
|
1968
|
+
"type": "FOREIGN KEY",
|
|
1969
|
+
"def": "FOREIGN KEY (source_document_component_id) REFERENCES artifact_standard_document_components (document_component_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE",
|
|
1970
|
+
"table": "artifact_standard_document_component_relations",
|
|
1971
|
+
"referenced_table": "artifact_standard_document_components",
|
|
1972
|
+
"columns": [
|
|
1973
|
+
"source_document_component_id"
|
|
1974
|
+
],
|
|
1975
|
+
"referenced_columns": [
|
|
1976
|
+
"document_component_id"
|
|
1977
|
+
]
|
|
1978
|
+
},
|
|
1979
|
+
{
|
|
1980
|
+
"name": "- (Foreign key ID: 2)",
|
|
1981
|
+
"type": "FOREIGN KEY",
|
|
1982
|
+
"def": "FOREIGN KEY (artifact_standard_id) REFERENCES artifact_standard_standards (artifact_standard_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE",
|
|
1983
|
+
"table": "artifact_standard_document_component_relations",
|
|
1984
|
+
"referenced_table": "artifact_standard_standards",
|
|
1985
|
+
"columns": [
|
|
1986
|
+
"artifact_standard_id"
|
|
1987
|
+
],
|
|
1988
|
+
"referenced_columns": [
|
|
1989
|
+
"artifact_standard_id"
|
|
1990
|
+
]
|
|
1991
|
+
},
|
|
1992
|
+
{
|
|
1993
|
+
"name": "sqlite_autoindex_artifact_standard_document_component_relations_2",
|
|
1994
|
+
"type": "UNIQUE",
|
|
1995
|
+
"def": "UNIQUE (source_document_component_id, target_document_component_id, relation_type_code)",
|
|
1996
|
+
"table": "artifact_standard_document_component_relations",
|
|
1997
|
+
"columns": [
|
|
1998
|
+
"source_document_component_id",
|
|
1999
|
+
"target_document_component_id",
|
|
2000
|
+
"relation_type_code"
|
|
2001
|
+
]
|
|
2002
|
+
},
|
|
2003
|
+
{
|
|
2004
|
+
"name": "sqlite_autoindex_artifact_standard_document_component_relations_1",
|
|
2005
|
+
"type": "PRIMARY KEY",
|
|
2006
|
+
"def": "PRIMARY KEY (document_component_relation_id)",
|
|
2007
|
+
"table": "artifact_standard_document_component_relations",
|
|
2008
|
+
"columns": [
|
|
2009
|
+
"document_component_relation_id"
|
|
2010
|
+
]
|
|
2011
|
+
},
|
|
2012
|
+
{
|
|
2013
|
+
"name": "-",
|
|
2014
|
+
"type": "CHECK",
|
|
2015
|
+
"def": "CHECK (length(document_component_relation_id) = 36)",
|
|
2016
|
+
"table": "artifact_standard_document_component_relations",
|
|
2017
|
+
"columns": [
|
|
2018
|
+
"document_component_relation_id"
|
|
2019
|
+
]
|
|
2020
|
+
},
|
|
2021
|
+
{
|
|
2022
|
+
"name": "-",
|
|
2023
|
+
"type": "CHECK",
|
|
2024
|
+
"def": "CHECK (length(artifact_standard_id) = 36)",
|
|
2025
|
+
"table": "artifact_standard_document_component_relations",
|
|
2026
|
+
"columns": [
|
|
2027
|
+
"artifact_standard_id"
|
|
2028
|
+
]
|
|
2029
|
+
},
|
|
2030
|
+
{
|
|
2031
|
+
"name": "-",
|
|
2032
|
+
"type": "CHECK",
|
|
2033
|
+
"def": "CHECK (length(source_document_component_id) = 36)",
|
|
2034
|
+
"table": "artifact_standard_document_component_relations",
|
|
2035
|
+
"columns": [
|
|
2036
|
+
"source_document_component_id"
|
|
2037
|
+
]
|
|
2038
|
+
},
|
|
2039
|
+
{
|
|
2040
|
+
"name": "-",
|
|
2041
|
+
"type": "CHECK",
|
|
2042
|
+
"def": "CHECK (length(target_document_component_id) = 36)",
|
|
2043
|
+
"table": "artifact_standard_document_component_relations",
|
|
2044
|
+
"columns": [
|
|
2045
|
+
"target_document_component_id"
|
|
2046
|
+
]
|
|
2047
|
+
},
|
|
2048
|
+
{
|
|
2049
|
+
"name": "-",
|
|
2050
|
+
"type": "CHECK",
|
|
2051
|
+
"def": "CHECK (relation_type_code IN ('CONTAINS', 'DETAILS', 'SUPPORTS', 'REFERENCES'))",
|
|
2052
|
+
"table": "artifact_standard_document_component_relations",
|
|
2053
|
+
"columns": [
|
|
2054
|
+
"relation_type_code"
|
|
2055
|
+
]
|
|
2056
|
+
},
|
|
2057
|
+
{
|
|
2058
|
+
"name": "-",
|
|
2059
|
+
"type": "CHECK",
|
|
2060
|
+
"def": "CHECK (is_required IN (0, 1))",
|
|
2061
|
+
"table": "artifact_standard_document_component_relations",
|
|
2062
|
+
"columns": [
|
|
2063
|
+
"is_required"
|
|
2064
|
+
]
|
|
2065
|
+
},
|
|
2066
|
+
{
|
|
2067
|
+
"name": "-",
|
|
2068
|
+
"type": "CHECK",
|
|
2069
|
+
"def": "CHECK (metadata_json IS NULL OR json_valid(metadata_json))",
|
|
2070
|
+
"table": "artifact_standard_document_component_relations",
|
|
2071
|
+
"columns": [
|
|
2072
|
+
"metadata_json"
|
|
2073
|
+
]
|
|
2074
|
+
}
|
|
2075
|
+
],
|
|
2076
|
+
"def": "CREATE TABLE artifact_standard_document_component_relations (\n -- document component relation 식별자\n document_component_relation_id CHAR(36) PRIMARY KEY\n CHECK (length(document_component_relation_id) = 36),\n\n -- 소속 산출물 표준 식별자\n artifact_standard_id CHAR(36) NOT NULL\n CHECK (length(artifact_standard_id) = 36),\n\n -- source document component 식별자\n source_document_component_id CHAR(36) NOT NULL\n CHECK (length(source_document_component_id) = 36),\n\n -- target document component 식별자\n target_document_component_id CHAR(36) NOT NULL\n CHECK (length(target_document_component_id) = 36),\n\n -- 관계 유형 코드\n relation_type_code VARCHAR(64) NOT NULL\n CHECK (relation_type_code IN ('CONTAINS', 'DETAILS', 'SUPPORTS', 'REFERENCES')),\n\n -- 필수 관계 여부\n is_required INTEGER NOT NULL DEFAULT 0\n CHECK (is_required IN (0, 1)),\n\n -- 표시 정렬 순서\n sort_order INTEGER NOT NULL DEFAULT 0,\n\n -- 설명\n description TEXT,\n\n -- 생성 시각\n created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 수정 시각\n updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 확장 메타데이터\n metadata_json JSON\n CHECK (metadata_json IS NULL OR json_valid(metadata_json)),\n\n FOREIGN KEY (artifact_standard_id)\n REFERENCES artifact_standard_standards (artifact_standard_id)\n ON DELETE CASCADE,\n\n FOREIGN KEY (source_document_component_id)\n REFERENCES artifact_standard_document_components (document_component_id)\n ON DELETE CASCADE,\n\n FOREIGN KEY (target_document_component_id)\n REFERENCES artifact_standard_document_components (document_component_id)\n ON DELETE CASCADE,\n\n UNIQUE (source_document_component_id, target_document_component_id, relation_type_code)\n)"
|
|
2077
|
+
},
|
|
2078
|
+
{
|
|
2079
|
+
"name": "artifact_standard_physical_structure_policies",
|
|
2080
|
+
"type": "table",
|
|
2081
|
+
"columns": [
|
|
2082
|
+
{
|
|
2083
|
+
"name": "physical_structure_policy_id",
|
|
2084
|
+
"type": "CHAR(36)",
|
|
2085
|
+
"nullable": true
|
|
2086
|
+
},
|
|
2087
|
+
{
|
|
2088
|
+
"name": "artifact_standard_id",
|
|
2089
|
+
"type": "CHAR(36)",
|
|
2090
|
+
"nullable": false
|
|
2091
|
+
},
|
|
2092
|
+
{
|
|
2093
|
+
"name": "document_component_id",
|
|
2094
|
+
"type": "CHAR(36)",
|
|
2095
|
+
"nullable": true
|
|
2096
|
+
},
|
|
2097
|
+
{
|
|
2098
|
+
"name": "policy_code",
|
|
2099
|
+
"type": "VARCHAR(128)",
|
|
2100
|
+
"nullable": false
|
|
2101
|
+
},
|
|
2102
|
+
{
|
|
2103
|
+
"name": "policy_name",
|
|
2104
|
+
"type": "VARCHAR(256)",
|
|
2105
|
+
"nullable": false
|
|
2106
|
+
},
|
|
2107
|
+
{
|
|
2108
|
+
"name": "strategy_code",
|
|
2109
|
+
"type": "VARCHAR(64)",
|
|
2110
|
+
"nullable": false
|
|
2111
|
+
},
|
|
2112
|
+
{
|
|
2113
|
+
"name": "relation_source_code",
|
|
2114
|
+
"type": "VARCHAR(64)",
|
|
2115
|
+
"nullable": false,
|
|
2116
|
+
"default": "'DB'"
|
|
2117
|
+
},
|
|
2118
|
+
{
|
|
2119
|
+
"name": "path_pattern",
|
|
2120
|
+
"type": "VARCHAR(1024)",
|
|
2121
|
+
"nullable": true
|
|
2122
|
+
},
|
|
2123
|
+
{
|
|
2124
|
+
"name": "naming_pattern",
|
|
2125
|
+
"type": "VARCHAR(512)",
|
|
2126
|
+
"nullable": true
|
|
2127
|
+
},
|
|
2128
|
+
{
|
|
2129
|
+
"name": "is_default",
|
|
2130
|
+
"type": "INTEGER",
|
|
2131
|
+
"nullable": false,
|
|
2132
|
+
"default": "0"
|
|
2133
|
+
},
|
|
2134
|
+
{
|
|
2135
|
+
"name": "description",
|
|
2136
|
+
"type": "TEXT",
|
|
2137
|
+
"nullable": true
|
|
2138
|
+
},
|
|
2139
|
+
{
|
|
2140
|
+
"name": "created_at",
|
|
2141
|
+
"type": "DATETIME",
|
|
2142
|
+
"nullable": false,
|
|
2143
|
+
"default": "CURRENT_TIMESTAMP"
|
|
2144
|
+
},
|
|
2145
|
+
{
|
|
2146
|
+
"name": "updated_at",
|
|
2147
|
+
"type": "DATETIME",
|
|
2148
|
+
"nullable": false,
|
|
2149
|
+
"default": "CURRENT_TIMESTAMP"
|
|
2150
|
+
},
|
|
2151
|
+
{
|
|
2152
|
+
"name": "metadata_json",
|
|
2153
|
+
"type": "JSON",
|
|
2154
|
+
"nullable": true
|
|
2155
|
+
}
|
|
2156
|
+
],
|
|
2157
|
+
"indexes": [
|
|
2158
|
+
{
|
|
2159
|
+
"name": "ux_artifact_standard_physical_structure_default",
|
|
2160
|
+
"def": "CREATE UNIQUE INDEX ux_artifact_standard_physical_structure_default\n ON artifact_standard_physical_structure_policies (artifact_standard_id)\n WHERE is_default = 1",
|
|
2161
|
+
"table": "artifact_standard_physical_structure_policies",
|
|
2162
|
+
"columns": [
|
|
2163
|
+
"artifact_standard_id"
|
|
2164
|
+
]
|
|
2165
|
+
},
|
|
2166
|
+
{
|
|
2167
|
+
"name": "idx_artifact_standard_physical_structure_policies_standard",
|
|
2168
|
+
"def": "CREATE INDEX idx_artifact_standard_physical_structure_policies_standard\n ON artifact_standard_physical_structure_policies (artifact_standard_id)",
|
|
2169
|
+
"table": "artifact_standard_physical_structure_policies",
|
|
2170
|
+
"columns": [
|
|
2171
|
+
"artifact_standard_id"
|
|
2172
|
+
]
|
|
2173
|
+
},
|
|
2174
|
+
{
|
|
2175
|
+
"name": "sqlite_autoindex_artifact_standard_physical_structure_policies_2",
|
|
2176
|
+
"def": "UNIQUE (artifact_standard_id, policy_code)",
|
|
2177
|
+
"table": "artifact_standard_physical_structure_policies",
|
|
2178
|
+
"columns": [
|
|
2179
|
+
"artifact_standard_id",
|
|
2180
|
+
"policy_code"
|
|
2181
|
+
]
|
|
2182
|
+
},
|
|
2183
|
+
{
|
|
2184
|
+
"name": "sqlite_autoindex_artifact_standard_physical_structure_policies_1",
|
|
2185
|
+
"def": "PRIMARY KEY (physical_structure_policy_id)",
|
|
2186
|
+
"table": "artifact_standard_physical_structure_policies",
|
|
2187
|
+
"columns": [
|
|
2188
|
+
"physical_structure_policy_id"
|
|
2189
|
+
]
|
|
2190
|
+
}
|
|
2191
|
+
],
|
|
2192
|
+
"constraints": [
|
|
2193
|
+
{
|
|
2194
|
+
"name": "physical_structure_policy_id",
|
|
2195
|
+
"type": "PRIMARY KEY",
|
|
2196
|
+
"def": "PRIMARY KEY (physical_structure_policy_id)",
|
|
2197
|
+
"table": "artifact_standard_physical_structure_policies",
|
|
2198
|
+
"columns": [
|
|
2199
|
+
"physical_structure_policy_id"
|
|
2200
|
+
]
|
|
2201
|
+
},
|
|
2202
|
+
{
|
|
2203
|
+
"name": "- (Foreign key ID: 0)",
|
|
2204
|
+
"type": "FOREIGN KEY",
|
|
2205
|
+
"def": "FOREIGN KEY (document_component_id) REFERENCES artifact_standard_document_components (document_component_id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE",
|
|
2206
|
+
"table": "artifact_standard_physical_structure_policies",
|
|
2207
|
+
"referenced_table": "artifact_standard_document_components",
|
|
2208
|
+
"columns": [
|
|
2209
|
+
"document_component_id"
|
|
2210
|
+
],
|
|
2211
|
+
"referenced_columns": [
|
|
2212
|
+
"document_component_id"
|
|
2213
|
+
]
|
|
2214
|
+
},
|
|
2215
|
+
{
|
|
2216
|
+
"name": "- (Foreign key ID: 1)",
|
|
2217
|
+
"type": "FOREIGN KEY",
|
|
2218
|
+
"def": "FOREIGN KEY (artifact_standard_id) REFERENCES artifact_standard_standards (artifact_standard_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE",
|
|
2219
|
+
"table": "artifact_standard_physical_structure_policies",
|
|
2220
|
+
"referenced_table": "artifact_standard_standards",
|
|
2221
|
+
"columns": [
|
|
2222
|
+
"artifact_standard_id"
|
|
2223
|
+
],
|
|
2224
|
+
"referenced_columns": [
|
|
2225
|
+
"artifact_standard_id"
|
|
2226
|
+
]
|
|
2227
|
+
},
|
|
2228
|
+
{
|
|
2229
|
+
"name": "sqlite_autoindex_artifact_standard_physical_structure_policies_2",
|
|
2230
|
+
"type": "UNIQUE",
|
|
2231
|
+
"def": "UNIQUE (artifact_standard_id, policy_code)",
|
|
2232
|
+
"table": "artifact_standard_physical_structure_policies",
|
|
2233
|
+
"columns": [
|
|
2234
|
+
"artifact_standard_id",
|
|
2235
|
+
"policy_code"
|
|
2236
|
+
]
|
|
2237
|
+
},
|
|
2238
|
+
{
|
|
2239
|
+
"name": "sqlite_autoindex_artifact_standard_physical_structure_policies_1",
|
|
2240
|
+
"type": "PRIMARY KEY",
|
|
2241
|
+
"def": "PRIMARY KEY (physical_structure_policy_id)",
|
|
2242
|
+
"table": "artifact_standard_physical_structure_policies",
|
|
2243
|
+
"columns": [
|
|
2244
|
+
"physical_structure_policy_id"
|
|
2245
|
+
]
|
|
2246
|
+
},
|
|
2247
|
+
{
|
|
2248
|
+
"name": "-",
|
|
2249
|
+
"type": "CHECK",
|
|
2250
|
+
"def": "CHECK (length(physical_structure_policy_id) = 36)",
|
|
2251
|
+
"table": "artifact_standard_physical_structure_policies",
|
|
2252
|
+
"columns": [
|
|
2253
|
+
"physical_structure_policy_id"
|
|
2254
|
+
]
|
|
2255
|
+
},
|
|
2256
|
+
{
|
|
2257
|
+
"name": "-",
|
|
2258
|
+
"type": "CHECK",
|
|
2259
|
+
"def": "CHECK (length(artifact_standard_id) = 36)",
|
|
2260
|
+
"table": "artifact_standard_physical_structure_policies",
|
|
2261
|
+
"columns": [
|
|
2262
|
+
"artifact_standard_id"
|
|
2263
|
+
]
|
|
2264
|
+
},
|
|
2265
|
+
{
|
|
2266
|
+
"name": "-",
|
|
2267
|
+
"type": "CHECK",
|
|
2268
|
+
"def": "CHECK (document_component_id IS NULL OR length(document_component_id) = 36)",
|
|
2269
|
+
"table": "artifact_standard_physical_structure_policies",
|
|
2270
|
+
"columns": [
|
|
2271
|
+
"document_component_id"
|
|
2272
|
+
]
|
|
2273
|
+
},
|
|
2274
|
+
{
|
|
2275
|
+
"name": "-",
|
|
2276
|
+
"type": "CHECK",
|
|
2277
|
+
"def": "CHECK (strategy_code IN ('HIERARCHICAL', 'GROUPED_BY_LEVEL', 'GROUPED_BY_PARENT', 'FLAT_WITH_MANIFEST'))",
|
|
2278
|
+
"table": "artifact_standard_physical_structure_policies",
|
|
2279
|
+
"columns": [
|
|
2280
|
+
"strategy_code"
|
|
2281
|
+
]
|
|
2282
|
+
},
|
|
2283
|
+
{
|
|
2284
|
+
"name": "-",
|
|
2285
|
+
"type": "CHECK",
|
|
2286
|
+
"def": "CHECK (relation_source_code IN ('DB', 'MANIFEST', 'FILE_PATH'))",
|
|
2287
|
+
"table": "artifact_standard_physical_structure_policies",
|
|
2288
|
+
"columns": [
|
|
2289
|
+
"relation_source_code"
|
|
2290
|
+
]
|
|
2291
|
+
},
|
|
2292
|
+
{
|
|
2293
|
+
"name": "-",
|
|
2294
|
+
"type": "CHECK",
|
|
2295
|
+
"def": "CHECK (is_default IN (0, 1))",
|
|
2296
|
+
"table": "artifact_standard_physical_structure_policies",
|
|
2297
|
+
"columns": [
|
|
2298
|
+
"is_default"
|
|
2299
|
+
]
|
|
2300
|
+
},
|
|
2301
|
+
{
|
|
2302
|
+
"name": "-",
|
|
2303
|
+
"type": "CHECK",
|
|
2304
|
+
"def": "CHECK (metadata_json IS NULL OR json_valid(metadata_json))",
|
|
2305
|
+
"table": "artifact_standard_physical_structure_policies",
|
|
2306
|
+
"columns": [
|
|
2307
|
+
"metadata_json"
|
|
2308
|
+
]
|
|
2309
|
+
}
|
|
2310
|
+
],
|
|
2311
|
+
"def": "CREATE TABLE artifact_standard_physical_structure_policies (\n -- physical structure policy 식별자\n physical_structure_policy_id CHAR(36) PRIMARY KEY\n CHECK (length(physical_structure_policy_id) = 36),\n\n -- 소속 산출물 표준 식별자\n artifact_standard_id CHAR(36) NOT NULL\n CHECK (length(artifact_standard_id) = 36),\n\n -- 특정 document component에 한정되는 경우의 component 식별자\n document_component_id CHAR(36)\n CHECK (document_component_id IS NULL OR length(document_component_id) = 36),\n\n -- physical structure policy 코드\n policy_code VARCHAR(128) NOT NULL,\n\n -- physical structure policy 이름\n policy_name VARCHAR(256) NOT NULL,\n\n -- 물리 배치 전략 코드\n strategy_code VARCHAR(64) NOT NULL\n CHECK (strategy_code IN ('HIERARCHICAL', 'GROUPED_BY_LEVEL', 'GROUPED_BY_PARENT', 'FLAT_WITH_MANIFEST')),\n\n -- 물리 구조에서 관계를 해석하는 기준 원천\n relation_source_code VARCHAR(64) NOT NULL DEFAULT 'DB'\n CHECK (relation_source_code IN ('DB', 'MANIFEST', 'FILE_PATH')),\n\n -- 경로 pattern\n path_pattern VARCHAR(1024),\n\n -- 파일명 pattern\n naming_pattern VARCHAR(512),\n\n -- 기본 정책 여부\n is_default INTEGER NOT NULL DEFAULT 0\n CHECK (is_default IN (0, 1)),\n\n -- 설명\n description TEXT,\n\n -- 생성 시각\n created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 수정 시각\n updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 확장 메타데이터\n metadata_json JSON\n CHECK (metadata_json IS NULL OR json_valid(metadata_json)),\n\n FOREIGN KEY (artifact_standard_id)\n REFERENCES artifact_standard_standards (artifact_standard_id)\n ON DELETE CASCADE,\n\n FOREIGN KEY (document_component_id)\n REFERENCES artifact_standard_document_components (document_component_id)\n ON DELETE SET NULL,\n\n UNIQUE (artifact_standard_id, policy_code)\n)"
|
|
2312
|
+
},
|
|
2313
|
+
{
|
|
2314
|
+
"name": "artifact_standard_table_schemas",
|
|
2315
|
+
"type": "table",
|
|
2316
|
+
"comment": "산출물 표 단위 schema를 관리한다.",
|
|
2317
|
+
"columns": [
|
|
2318
|
+
{
|
|
2319
|
+
"name": "table_schema_id",
|
|
2320
|
+
"type": "CHAR(36)",
|
|
2321
|
+
"nullable": true
|
|
2322
|
+
},
|
|
2323
|
+
{
|
|
2324
|
+
"name": "artifact_standard_id",
|
|
2325
|
+
"type": "CHAR(36)",
|
|
2326
|
+
"nullable": false
|
|
2327
|
+
},
|
|
2328
|
+
{
|
|
2329
|
+
"name": "table_schema_code",
|
|
2330
|
+
"type": "VARCHAR(128)",
|
|
2331
|
+
"nullable": false
|
|
2332
|
+
},
|
|
2333
|
+
{
|
|
2334
|
+
"name": "table_name",
|
|
2335
|
+
"type": "VARCHAR(256)",
|
|
2336
|
+
"nullable": false
|
|
2337
|
+
},
|
|
2338
|
+
{
|
|
2339
|
+
"name": "caption_required",
|
|
2340
|
+
"type": "INTEGER",
|
|
2341
|
+
"nullable": false,
|
|
2342
|
+
"default": "1"
|
|
2343
|
+
},
|
|
2344
|
+
{
|
|
2345
|
+
"name": "rows_required",
|
|
2346
|
+
"type": "INTEGER",
|
|
2347
|
+
"nullable": false,
|
|
2348
|
+
"default": "0"
|
|
2349
|
+
},
|
|
2350
|
+
{
|
|
2351
|
+
"name": "description",
|
|
2352
|
+
"type": "TEXT",
|
|
2353
|
+
"nullable": true
|
|
2354
|
+
},
|
|
2355
|
+
{
|
|
2356
|
+
"name": "created_at",
|
|
2357
|
+
"type": "DATETIME",
|
|
2358
|
+
"nullable": false,
|
|
2359
|
+
"default": "CURRENT_TIMESTAMP"
|
|
2360
|
+
},
|
|
2361
|
+
{
|
|
2362
|
+
"name": "updated_at",
|
|
2363
|
+
"type": "DATETIME",
|
|
2364
|
+
"nullable": false,
|
|
2365
|
+
"default": "CURRENT_TIMESTAMP"
|
|
2366
|
+
},
|
|
2367
|
+
{
|
|
2368
|
+
"name": "metadata_json",
|
|
2369
|
+
"type": "JSON",
|
|
2370
|
+
"nullable": true
|
|
2371
|
+
}
|
|
2372
|
+
],
|
|
2373
|
+
"indexes": [
|
|
2374
|
+
{
|
|
2375
|
+
"name": "sqlite_autoindex_artifact_standard_table_schemas_2",
|
|
2376
|
+
"def": "UNIQUE (artifact_standard_id, table_schema_code)",
|
|
2377
|
+
"table": "artifact_standard_table_schemas",
|
|
2378
|
+
"columns": [
|
|
2379
|
+
"artifact_standard_id",
|
|
2380
|
+
"table_schema_code"
|
|
2381
|
+
]
|
|
2382
|
+
},
|
|
2383
|
+
{
|
|
2384
|
+
"name": "sqlite_autoindex_artifact_standard_table_schemas_1",
|
|
2385
|
+
"def": "PRIMARY KEY (table_schema_id)",
|
|
2386
|
+
"table": "artifact_standard_table_schemas",
|
|
2387
|
+
"columns": [
|
|
2388
|
+
"table_schema_id"
|
|
2389
|
+
]
|
|
2390
|
+
}
|
|
2391
|
+
],
|
|
2392
|
+
"constraints": [
|
|
2393
|
+
{
|
|
2394
|
+
"name": "table_schema_id",
|
|
2395
|
+
"type": "PRIMARY KEY",
|
|
2396
|
+
"def": "PRIMARY KEY (table_schema_id)",
|
|
2397
|
+
"table": "artifact_standard_table_schemas",
|
|
2398
|
+
"columns": [
|
|
2399
|
+
"table_schema_id"
|
|
2400
|
+
]
|
|
2401
|
+
},
|
|
2402
|
+
{
|
|
2403
|
+
"name": "- (Foreign key ID: 0)",
|
|
2404
|
+
"type": "FOREIGN KEY",
|
|
2405
|
+
"def": "FOREIGN KEY (artifact_standard_id) REFERENCES artifact_standard_standards (artifact_standard_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE",
|
|
2406
|
+
"table": "artifact_standard_table_schemas",
|
|
2407
|
+
"referenced_table": "artifact_standard_standards",
|
|
2408
|
+
"columns": [
|
|
2409
|
+
"artifact_standard_id"
|
|
2410
|
+
],
|
|
2411
|
+
"referenced_columns": [
|
|
2412
|
+
"artifact_standard_id"
|
|
2413
|
+
]
|
|
2414
|
+
},
|
|
2415
|
+
{
|
|
2416
|
+
"name": "sqlite_autoindex_artifact_standard_table_schemas_2",
|
|
2417
|
+
"type": "UNIQUE",
|
|
2418
|
+
"def": "UNIQUE (artifact_standard_id, table_schema_code)",
|
|
2419
|
+
"table": "artifact_standard_table_schemas",
|
|
2420
|
+
"columns": [
|
|
2421
|
+
"artifact_standard_id",
|
|
2422
|
+
"table_schema_code"
|
|
2423
|
+
]
|
|
2424
|
+
},
|
|
2425
|
+
{
|
|
2426
|
+
"name": "sqlite_autoindex_artifact_standard_table_schemas_1",
|
|
2427
|
+
"type": "PRIMARY KEY",
|
|
2428
|
+
"def": "PRIMARY KEY (table_schema_id)",
|
|
2429
|
+
"table": "artifact_standard_table_schemas",
|
|
2430
|
+
"columns": [
|
|
2431
|
+
"table_schema_id"
|
|
2432
|
+
]
|
|
2433
|
+
},
|
|
2434
|
+
{
|
|
2435
|
+
"name": "-",
|
|
2436
|
+
"type": "CHECK",
|
|
2437
|
+
"def": "CHECK (length(table_schema_id) = 36)",
|
|
2438
|
+
"table": "artifact_standard_table_schemas",
|
|
2439
|
+
"columns": [
|
|
2440
|
+
"table_schema_id"
|
|
2441
|
+
]
|
|
2442
|
+
},
|
|
2443
|
+
{
|
|
2444
|
+
"name": "-",
|
|
2445
|
+
"type": "CHECK",
|
|
2446
|
+
"def": "CHECK (length(artifact_standard_id) = 36)",
|
|
2447
|
+
"table": "artifact_standard_table_schemas",
|
|
2448
|
+
"columns": [
|
|
2449
|
+
"artifact_standard_id"
|
|
2450
|
+
]
|
|
2451
|
+
},
|
|
2452
|
+
{
|
|
2453
|
+
"name": "-",
|
|
2454
|
+
"type": "CHECK",
|
|
2455
|
+
"def": "CHECK (caption_required IN (0, 1))",
|
|
2456
|
+
"table": "artifact_standard_table_schemas",
|
|
2457
|
+
"columns": [
|
|
2458
|
+
"caption_required"
|
|
2459
|
+
]
|
|
2460
|
+
},
|
|
2461
|
+
{
|
|
2462
|
+
"name": "-",
|
|
2463
|
+
"type": "CHECK",
|
|
2464
|
+
"def": "CHECK (rows_required IN (0, 1))",
|
|
2465
|
+
"table": "artifact_standard_table_schemas",
|
|
2466
|
+
"columns": [
|
|
2467
|
+
"rows_required"
|
|
2468
|
+
]
|
|
2469
|
+
},
|
|
2470
|
+
{
|
|
2471
|
+
"name": "-",
|
|
2472
|
+
"type": "CHECK",
|
|
2473
|
+
"def": "CHECK (metadata_json IS NULL OR json_valid(metadata_json))",
|
|
2474
|
+
"table": "artifact_standard_table_schemas",
|
|
2475
|
+
"columns": [
|
|
2476
|
+
"metadata_json"
|
|
2477
|
+
]
|
|
2478
|
+
}
|
|
2479
|
+
],
|
|
2480
|
+
"def": "CREATE TABLE artifact_standard_table_schemas (\n -- table schema 식별자\n table_schema_id CHAR(36) PRIMARY KEY\n CHECK (length(table_schema_id) = 36),\n\n -- 소속 산출물 표준 식별자\n artifact_standard_id CHAR(36) NOT NULL\n CHECK (length(artifact_standard_id) = 36),\n\n -- table schema 코드\n table_schema_code VARCHAR(128) NOT NULL,\n\n -- table 이름\n table_name VARCHAR(256) NOT NULL,\n\n -- caption 필수 여부\n caption_required INTEGER NOT NULL DEFAULT 1\n CHECK (caption_required IN (0, 1)),\n\n -- row 필수 여부\n rows_required INTEGER NOT NULL DEFAULT 0\n CHECK (rows_required IN (0, 1)),\n\n -- 설명\n description TEXT,\n\n -- 생성 시각\n created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 수정 시각\n updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 확장 메타데이터\n metadata_json JSON\n CHECK (metadata_json IS NULL OR json_valid(metadata_json)),\n\n FOREIGN KEY (artifact_standard_id)\n REFERENCES artifact_standard_standards (artifact_standard_id)\n ON DELETE CASCADE,\n\n UNIQUE (artifact_standard_id, table_schema_code)\n)"
|
|
2481
|
+
},
|
|
2482
|
+
{
|
|
2483
|
+
"name": "artifact_standard_table_column_schemas",
|
|
2484
|
+
"type": "table",
|
|
2485
|
+
"comment": "산출물 표의 column 단위 schema를 관리한다.",
|
|
2486
|
+
"columns": [
|
|
2487
|
+
{
|
|
2488
|
+
"name": "table_column_schema_id",
|
|
2489
|
+
"type": "CHAR(36)",
|
|
2490
|
+
"nullable": true
|
|
2491
|
+
},
|
|
2492
|
+
{
|
|
2493
|
+
"name": "table_schema_id",
|
|
2494
|
+
"type": "CHAR(36)",
|
|
2495
|
+
"nullable": false
|
|
2496
|
+
},
|
|
2497
|
+
{
|
|
2498
|
+
"name": "column_code",
|
|
2499
|
+
"type": "VARCHAR(128)",
|
|
2500
|
+
"nullable": false
|
|
2501
|
+
},
|
|
2502
|
+
{
|
|
2503
|
+
"name": "display_name",
|
|
2504
|
+
"type": "VARCHAR(256)",
|
|
2505
|
+
"nullable": false
|
|
2506
|
+
},
|
|
2507
|
+
{
|
|
2508
|
+
"name": "value_type_code",
|
|
2509
|
+
"type": "VARCHAR(64)",
|
|
2510
|
+
"nullable": false,
|
|
2511
|
+
"default": "'TEXT'"
|
|
2512
|
+
},
|
|
2513
|
+
{
|
|
2514
|
+
"name": "is_required",
|
|
2515
|
+
"type": "INTEGER",
|
|
2516
|
+
"nullable": false,
|
|
2517
|
+
"default": "1"
|
|
2518
|
+
},
|
|
2519
|
+
{
|
|
2520
|
+
"name": "is_nullable",
|
|
2521
|
+
"type": "INTEGER",
|
|
2522
|
+
"nullable": false,
|
|
2523
|
+
"default": "0"
|
|
2524
|
+
},
|
|
2525
|
+
{
|
|
2526
|
+
"name": "sort_order",
|
|
2527
|
+
"type": "INTEGER",
|
|
2528
|
+
"nullable": false,
|
|
2529
|
+
"default": "0"
|
|
2530
|
+
},
|
|
2531
|
+
{
|
|
2532
|
+
"name": "code_set_ref",
|
|
2533
|
+
"type": "VARCHAR(256)",
|
|
2534
|
+
"nullable": true
|
|
2535
|
+
},
|
|
2536
|
+
{
|
|
2537
|
+
"name": "allowed_values_ref",
|
|
2538
|
+
"type": "VARCHAR(256)",
|
|
2539
|
+
"nullable": true
|
|
2540
|
+
},
|
|
2541
|
+
{
|
|
2542
|
+
"name": "validation_rule_ref",
|
|
2543
|
+
"type": "VARCHAR(256)",
|
|
2544
|
+
"nullable": true
|
|
2545
|
+
},
|
|
2546
|
+
{
|
|
2547
|
+
"name": "pattern",
|
|
2548
|
+
"type": "VARCHAR(512)",
|
|
2549
|
+
"nullable": true
|
|
2550
|
+
},
|
|
2551
|
+
{
|
|
2552
|
+
"name": "min_value",
|
|
2553
|
+
"type": "DECIMAL",
|
|
2554
|
+
"nullable": true
|
|
2555
|
+
},
|
|
2556
|
+
{
|
|
2557
|
+
"name": "max_value",
|
|
2558
|
+
"type": "DECIMAL",
|
|
2559
|
+
"nullable": true
|
|
2560
|
+
},
|
|
2561
|
+
{
|
|
2562
|
+
"name": "min_length",
|
|
2563
|
+
"type": "INTEGER",
|
|
2564
|
+
"nullable": true
|
|
2565
|
+
},
|
|
2566
|
+
{
|
|
2567
|
+
"name": "max_length",
|
|
2568
|
+
"type": "INTEGER",
|
|
2569
|
+
"nullable": true
|
|
2570
|
+
},
|
|
2571
|
+
{
|
|
2572
|
+
"name": "example_value",
|
|
2573
|
+
"type": "TEXT",
|
|
2574
|
+
"nullable": true
|
|
2575
|
+
},
|
|
2576
|
+
{
|
|
2577
|
+
"name": "description",
|
|
2578
|
+
"type": "TEXT",
|
|
2579
|
+
"nullable": true
|
|
2580
|
+
},
|
|
2581
|
+
{
|
|
2582
|
+
"name": "created_at",
|
|
2583
|
+
"type": "DATETIME",
|
|
2584
|
+
"nullable": false,
|
|
2585
|
+
"default": "CURRENT_TIMESTAMP"
|
|
2586
|
+
},
|
|
2587
|
+
{
|
|
2588
|
+
"name": "updated_at",
|
|
2589
|
+
"type": "DATETIME",
|
|
2590
|
+
"nullable": false,
|
|
2591
|
+
"default": "CURRENT_TIMESTAMP"
|
|
2592
|
+
},
|
|
2593
|
+
{
|
|
2594
|
+
"name": "metadata_json",
|
|
2595
|
+
"type": "JSON",
|
|
2596
|
+
"nullable": true
|
|
2597
|
+
}
|
|
2598
|
+
],
|
|
2599
|
+
"indexes": [
|
|
2600
|
+
{
|
|
2601
|
+
"name": "idx_artifact_standard_table_columns_schema",
|
|
2602
|
+
"def": "CREATE INDEX idx_artifact_standard_table_columns_schema\n ON artifact_standard_table_column_schemas (table_schema_id)",
|
|
2603
|
+
"table": "artifact_standard_table_column_schemas",
|
|
2604
|
+
"columns": [
|
|
2605
|
+
"table_schema_id"
|
|
2606
|
+
]
|
|
2607
|
+
},
|
|
2608
|
+
{
|
|
2609
|
+
"name": "sqlite_autoindex_artifact_standard_table_column_schemas_3",
|
|
2610
|
+
"def": "UNIQUE (table_schema_id, sort_order)",
|
|
2611
|
+
"table": "artifact_standard_table_column_schemas",
|
|
2612
|
+
"columns": [
|
|
2613
|
+
"table_schema_id",
|
|
2614
|
+
"sort_order"
|
|
2615
|
+
]
|
|
2616
|
+
},
|
|
2617
|
+
{
|
|
2618
|
+
"name": "sqlite_autoindex_artifact_standard_table_column_schemas_2",
|
|
2619
|
+
"def": "UNIQUE (table_schema_id, column_code)",
|
|
2620
|
+
"table": "artifact_standard_table_column_schemas",
|
|
2621
|
+
"columns": [
|
|
2622
|
+
"table_schema_id",
|
|
2623
|
+
"column_code"
|
|
2624
|
+
]
|
|
2625
|
+
},
|
|
2626
|
+
{
|
|
2627
|
+
"name": "sqlite_autoindex_artifact_standard_table_column_schemas_1",
|
|
2628
|
+
"def": "PRIMARY KEY (table_column_schema_id)",
|
|
2629
|
+
"table": "artifact_standard_table_column_schemas",
|
|
2630
|
+
"columns": [
|
|
2631
|
+
"table_column_schema_id"
|
|
2632
|
+
]
|
|
2633
|
+
}
|
|
2634
|
+
],
|
|
2635
|
+
"constraints": [
|
|
2636
|
+
{
|
|
2637
|
+
"name": "table_column_schema_id",
|
|
2638
|
+
"type": "PRIMARY KEY",
|
|
2639
|
+
"def": "PRIMARY KEY (table_column_schema_id)",
|
|
2640
|
+
"table": "artifact_standard_table_column_schemas",
|
|
2641
|
+
"columns": [
|
|
2642
|
+
"table_column_schema_id"
|
|
2643
|
+
]
|
|
2644
|
+
},
|
|
2645
|
+
{
|
|
2646
|
+
"name": "- (Foreign key ID: 0)",
|
|
2647
|
+
"type": "FOREIGN KEY",
|
|
2648
|
+
"def": "FOREIGN KEY (table_schema_id) REFERENCES artifact_standard_table_schemas (table_schema_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE",
|
|
2649
|
+
"table": "artifact_standard_table_column_schemas",
|
|
2650
|
+
"referenced_table": "artifact_standard_table_schemas",
|
|
2651
|
+
"columns": [
|
|
2652
|
+
"table_schema_id"
|
|
2653
|
+
],
|
|
2654
|
+
"referenced_columns": [
|
|
2655
|
+
"table_schema_id"
|
|
2656
|
+
]
|
|
2657
|
+
},
|
|
2658
|
+
{
|
|
2659
|
+
"name": "sqlite_autoindex_artifact_standard_table_column_schemas_3",
|
|
2660
|
+
"type": "UNIQUE",
|
|
2661
|
+
"def": "UNIQUE (table_schema_id, sort_order)",
|
|
2662
|
+
"table": "artifact_standard_table_column_schemas",
|
|
2663
|
+
"columns": [
|
|
2664
|
+
"table_schema_id",
|
|
2665
|
+
"sort_order"
|
|
2666
|
+
]
|
|
2667
|
+
},
|
|
2668
|
+
{
|
|
2669
|
+
"name": "sqlite_autoindex_artifact_standard_table_column_schemas_2",
|
|
2670
|
+
"type": "UNIQUE",
|
|
2671
|
+
"def": "UNIQUE (table_schema_id, column_code)",
|
|
2672
|
+
"table": "artifact_standard_table_column_schemas",
|
|
2673
|
+
"columns": [
|
|
2674
|
+
"table_schema_id",
|
|
2675
|
+
"column_code"
|
|
2676
|
+
]
|
|
2677
|
+
},
|
|
2678
|
+
{
|
|
2679
|
+
"name": "sqlite_autoindex_artifact_standard_table_column_schemas_1",
|
|
2680
|
+
"type": "PRIMARY KEY",
|
|
2681
|
+
"def": "PRIMARY KEY (table_column_schema_id)",
|
|
2682
|
+
"table": "artifact_standard_table_column_schemas",
|
|
2683
|
+
"columns": [
|
|
2684
|
+
"table_column_schema_id"
|
|
2685
|
+
]
|
|
2686
|
+
},
|
|
2687
|
+
{
|
|
2688
|
+
"name": "-",
|
|
2689
|
+
"type": "CHECK",
|
|
2690
|
+
"def": "CHECK (length(table_column_schema_id) = 36)",
|
|
2691
|
+
"table": "artifact_standard_table_column_schemas",
|
|
2692
|
+
"columns": [
|
|
2693
|
+
"table_column_schema_id"
|
|
2694
|
+
]
|
|
2695
|
+
},
|
|
2696
|
+
{
|
|
2697
|
+
"name": "-",
|
|
2698
|
+
"type": "CHECK",
|
|
2699
|
+
"def": "CHECK (length(table_schema_id) = 36)",
|
|
2700
|
+
"table": "artifact_standard_table_column_schemas",
|
|
2701
|
+
"columns": [
|
|
2702
|
+
"table_schema_id"
|
|
2703
|
+
]
|
|
2704
|
+
},
|
|
2705
|
+
{
|
|
2706
|
+
"name": "-",
|
|
2707
|
+
"type": "CHECK",
|
|
2708
|
+
"def": "CHECK (is_required IN (0, 1))",
|
|
2709
|
+
"table": "artifact_standard_table_column_schemas",
|
|
2710
|
+
"columns": [
|
|
2711
|
+
"is_required"
|
|
2712
|
+
]
|
|
2713
|
+
},
|
|
2714
|
+
{
|
|
2715
|
+
"name": "-",
|
|
2716
|
+
"type": "CHECK",
|
|
2717
|
+
"def": "CHECK (is_nullable IN (0, 1))",
|
|
2718
|
+
"table": "artifact_standard_table_column_schemas",
|
|
2719
|
+
"columns": [
|
|
2720
|
+
"is_nullable"
|
|
2721
|
+
]
|
|
2722
|
+
},
|
|
2723
|
+
{
|
|
2724
|
+
"name": "-",
|
|
2725
|
+
"type": "CHECK",
|
|
2726
|
+
"def": "CHECK (metadata_json IS NULL OR json_valid(metadata_json))",
|
|
2727
|
+
"table": "artifact_standard_table_column_schemas",
|
|
2728
|
+
"columns": [
|
|
2729
|
+
"metadata_json"
|
|
2730
|
+
]
|
|
2731
|
+
}
|
|
2732
|
+
],
|
|
2733
|
+
"def": "CREATE TABLE artifact_standard_table_column_schemas (\n -- table column schema 식별자\n table_column_schema_id CHAR(36) PRIMARY KEY\n CHECK (length(table_column_schema_id) = 36),\n\n -- 소속 table schema 식별자\n table_schema_id CHAR(36) NOT NULL\n CHECK (length(table_schema_id) = 36),\n\n -- column 코드\n column_code VARCHAR(128) NOT NULL,\n\n -- 표시 column명\n display_name VARCHAR(256) NOT NULL,\n\n -- 값 유형 코드\n value_type_code VARCHAR(64) NOT NULL DEFAULT 'TEXT',\n\n -- 필수 여부\n is_required INTEGER NOT NULL DEFAULT 1\n CHECK (is_required IN (0, 1)),\n\n -- NULL 허용 여부\n is_nullable INTEGER NOT NULL DEFAULT 0\n CHECK (is_nullable IN (0, 1)),\n\n -- 표시 정렬 순서\n sort_order INTEGER NOT NULL DEFAULT 0,\n\n -- 코드셋 참조\n code_set_ref VARCHAR(256),\n\n -- 허용값 참조\n allowed_values_ref VARCHAR(256),\n\n -- validation rule 참조\n validation_rule_ref VARCHAR(256),\n\n -- 정규식 패턴\n pattern VARCHAR(512),\n\n -- 최소 숫자값\n min_value DECIMAL,\n\n -- 최대 숫자값\n max_value DECIMAL,\n\n -- 최소 길이\n min_length INTEGER,\n\n -- 최대 길이\n max_length INTEGER,\n\n -- 예시값\n example_value TEXT,\n\n -- 설명\n description TEXT,\n\n -- 생성 시각\n created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 수정 시각\n updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 확장 메타데이터\n metadata_json JSON\n CHECK (metadata_json IS NULL OR json_valid(metadata_json)),\n\n FOREIGN KEY (table_schema_id)\n REFERENCES artifact_standard_table_schemas (table_schema_id)\n ON DELETE CASCADE,\n\n UNIQUE (table_schema_id, column_code),\n UNIQUE (table_schema_id, sort_order)\n)"
|
|
2734
|
+
},
|
|
2735
|
+
{
|
|
2736
|
+
"name": "artifact_standard_figure_policies",
|
|
2737
|
+
"type": "table",
|
|
2738
|
+
"comment": "figure 작성/표현 policy를 관리한다.",
|
|
2739
|
+
"columns": [
|
|
2740
|
+
{
|
|
2741
|
+
"name": "figure_policy_id",
|
|
2742
|
+
"type": "CHAR(36)",
|
|
2743
|
+
"nullable": true
|
|
2744
|
+
},
|
|
2745
|
+
{
|
|
2746
|
+
"name": "artifact_standard_id",
|
|
2747
|
+
"type": "CHAR(36)",
|
|
2748
|
+
"nullable": false
|
|
2749
|
+
},
|
|
2750
|
+
{
|
|
2751
|
+
"name": "figure_policy_code",
|
|
2752
|
+
"type": "VARCHAR(128)",
|
|
2753
|
+
"nullable": false
|
|
2754
|
+
},
|
|
2755
|
+
{
|
|
2756
|
+
"name": "caption_required",
|
|
2757
|
+
"type": "INTEGER",
|
|
2758
|
+
"nullable": false,
|
|
2759
|
+
"default": "1"
|
|
2760
|
+
},
|
|
2761
|
+
{
|
|
2762
|
+
"name": "source_path_required",
|
|
2763
|
+
"type": "INTEGER",
|
|
2764
|
+
"nullable": false,
|
|
2765
|
+
"default": "1"
|
|
2766
|
+
},
|
|
2767
|
+
{
|
|
2768
|
+
"name": "visible_caption_mode_code",
|
|
2769
|
+
"type": "VARCHAR(64)",
|
|
2770
|
+
"nullable": false,
|
|
2771
|
+
"default": "'DEDUPLICATE'"
|
|
2772
|
+
},
|
|
2773
|
+
{
|
|
2774
|
+
"name": "description",
|
|
2775
|
+
"type": "TEXT",
|
|
2776
|
+
"nullable": true
|
|
2777
|
+
},
|
|
2778
|
+
{
|
|
2779
|
+
"name": "created_at",
|
|
2780
|
+
"type": "DATETIME",
|
|
2781
|
+
"nullable": false,
|
|
2782
|
+
"default": "CURRENT_TIMESTAMP"
|
|
2783
|
+
},
|
|
2784
|
+
{
|
|
2785
|
+
"name": "updated_at",
|
|
2786
|
+
"type": "DATETIME",
|
|
2787
|
+
"nullable": false,
|
|
2788
|
+
"default": "CURRENT_TIMESTAMP"
|
|
2789
|
+
},
|
|
2790
|
+
{
|
|
2791
|
+
"name": "metadata_json",
|
|
2792
|
+
"type": "JSON",
|
|
2793
|
+
"nullable": true
|
|
2794
|
+
}
|
|
2795
|
+
],
|
|
2796
|
+
"indexes": [
|
|
2797
|
+
{
|
|
2798
|
+
"name": "sqlite_autoindex_artifact_standard_figure_policies_2",
|
|
2799
|
+
"def": "UNIQUE (artifact_standard_id, figure_policy_code)",
|
|
2800
|
+
"table": "artifact_standard_figure_policies",
|
|
2801
|
+
"columns": [
|
|
2802
|
+
"artifact_standard_id",
|
|
2803
|
+
"figure_policy_code"
|
|
2804
|
+
]
|
|
2805
|
+
},
|
|
2806
|
+
{
|
|
2807
|
+
"name": "sqlite_autoindex_artifact_standard_figure_policies_1",
|
|
2808
|
+
"def": "PRIMARY KEY (figure_policy_id)",
|
|
2809
|
+
"table": "artifact_standard_figure_policies",
|
|
2810
|
+
"columns": [
|
|
2811
|
+
"figure_policy_id"
|
|
2812
|
+
]
|
|
2813
|
+
}
|
|
2814
|
+
],
|
|
2815
|
+
"constraints": [
|
|
2816
|
+
{
|
|
2817
|
+
"name": "figure_policy_id",
|
|
2818
|
+
"type": "PRIMARY KEY",
|
|
2819
|
+
"def": "PRIMARY KEY (figure_policy_id)",
|
|
2820
|
+
"table": "artifact_standard_figure_policies",
|
|
2821
|
+
"columns": [
|
|
2822
|
+
"figure_policy_id"
|
|
2823
|
+
]
|
|
2824
|
+
},
|
|
2825
|
+
{
|
|
2826
|
+
"name": "- (Foreign key ID: 0)",
|
|
2827
|
+
"type": "FOREIGN KEY",
|
|
2828
|
+
"def": "FOREIGN KEY (artifact_standard_id) REFERENCES artifact_standard_standards (artifact_standard_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE",
|
|
2829
|
+
"table": "artifact_standard_figure_policies",
|
|
2830
|
+
"referenced_table": "artifact_standard_standards",
|
|
2831
|
+
"columns": [
|
|
2832
|
+
"artifact_standard_id"
|
|
2833
|
+
],
|
|
2834
|
+
"referenced_columns": [
|
|
2835
|
+
"artifact_standard_id"
|
|
2836
|
+
]
|
|
2837
|
+
},
|
|
2838
|
+
{
|
|
2839
|
+
"name": "sqlite_autoindex_artifact_standard_figure_policies_2",
|
|
2840
|
+
"type": "UNIQUE",
|
|
2841
|
+
"def": "UNIQUE (artifact_standard_id, figure_policy_code)",
|
|
2842
|
+
"table": "artifact_standard_figure_policies",
|
|
2843
|
+
"columns": [
|
|
2844
|
+
"artifact_standard_id",
|
|
2845
|
+
"figure_policy_code"
|
|
2846
|
+
]
|
|
2847
|
+
},
|
|
2848
|
+
{
|
|
2849
|
+
"name": "sqlite_autoindex_artifact_standard_figure_policies_1",
|
|
2850
|
+
"type": "PRIMARY KEY",
|
|
2851
|
+
"def": "PRIMARY KEY (figure_policy_id)",
|
|
2852
|
+
"table": "artifact_standard_figure_policies",
|
|
2853
|
+
"columns": [
|
|
2854
|
+
"figure_policy_id"
|
|
2855
|
+
]
|
|
2856
|
+
},
|
|
2857
|
+
{
|
|
2858
|
+
"name": "-",
|
|
2859
|
+
"type": "CHECK",
|
|
2860
|
+
"def": "CHECK (length(figure_policy_id) = 36)",
|
|
2861
|
+
"table": "artifact_standard_figure_policies",
|
|
2862
|
+
"columns": [
|
|
2863
|
+
"figure_policy_id"
|
|
2864
|
+
]
|
|
2865
|
+
},
|
|
2866
|
+
{
|
|
2867
|
+
"name": "-",
|
|
2868
|
+
"type": "CHECK",
|
|
2869
|
+
"def": "CHECK (length(artifact_standard_id) = 36)",
|
|
2870
|
+
"table": "artifact_standard_figure_policies",
|
|
2871
|
+
"columns": [
|
|
2872
|
+
"artifact_standard_id"
|
|
2873
|
+
]
|
|
2874
|
+
},
|
|
2875
|
+
{
|
|
2876
|
+
"name": "-",
|
|
2877
|
+
"type": "CHECK",
|
|
2878
|
+
"def": "CHECK (caption_required IN (0, 1))",
|
|
2879
|
+
"table": "artifact_standard_figure_policies",
|
|
2880
|
+
"columns": [
|
|
2881
|
+
"caption_required"
|
|
2882
|
+
]
|
|
2883
|
+
},
|
|
2884
|
+
{
|
|
2885
|
+
"name": "-",
|
|
2886
|
+
"type": "CHECK",
|
|
2887
|
+
"def": "CHECK (source_path_required IN (0, 1))",
|
|
2888
|
+
"table": "artifact_standard_figure_policies",
|
|
2889
|
+
"columns": [
|
|
2890
|
+
"source_path_required"
|
|
2891
|
+
]
|
|
2892
|
+
},
|
|
2893
|
+
{
|
|
2894
|
+
"name": "-",
|
|
2895
|
+
"type": "CHECK",
|
|
2896
|
+
"def": "CHECK (metadata_json IS NULL OR json_valid(metadata_json))",
|
|
2897
|
+
"table": "artifact_standard_figure_policies",
|
|
2898
|
+
"columns": [
|
|
2899
|
+
"metadata_json"
|
|
2900
|
+
]
|
|
2901
|
+
}
|
|
2902
|
+
],
|
|
2903
|
+
"def": "CREATE TABLE artifact_standard_figure_policies (\n -- figure policy 식별자\n figure_policy_id CHAR(36) PRIMARY KEY\n CHECK (length(figure_policy_id) = 36),\n\n -- 소속 산출물 표준 식별자\n artifact_standard_id CHAR(36) NOT NULL\n CHECK (length(artifact_standard_id) = 36),\n\n -- figure policy 코드\n figure_policy_code VARCHAR(128) NOT NULL,\n\n -- caption 필수 여부\n caption_required INTEGER NOT NULL DEFAULT 1\n CHECK (caption_required IN (0, 1)),\n\n -- source path 필수 여부\n source_path_required INTEGER NOT NULL DEFAULT 1\n CHECK (source_path_required IN (0, 1)),\n\n -- visible caption mode 코드\n visible_caption_mode_code VARCHAR(64) NOT NULL DEFAULT 'DEDUPLICATE',\n\n -- 설명\n description TEXT,\n\n -- 생성 시각\n created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 수정 시각\n updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 확장 메타데이터\n metadata_json JSON\n CHECK (metadata_json IS NULL OR json_valid(metadata_json)),\n\n FOREIGN KEY (artifact_standard_id)\n REFERENCES artifact_standard_standards (artifact_standard_id)\n ON DELETE CASCADE,\n\n UNIQUE (artifact_standard_id, figure_policy_code)\n)"
|
|
2904
|
+
},
|
|
2905
|
+
{
|
|
2906
|
+
"name": "artifact_standard_diagram_policies",
|
|
2907
|
+
"type": "table",
|
|
2908
|
+
"comment": "diagram 작성/표현 policy를 관리한다.",
|
|
2909
|
+
"columns": [
|
|
2910
|
+
{
|
|
2911
|
+
"name": "diagram_policy_id",
|
|
2912
|
+
"type": "CHAR(36)",
|
|
2913
|
+
"nullable": true
|
|
2914
|
+
},
|
|
2915
|
+
{
|
|
2916
|
+
"name": "artifact_standard_id",
|
|
2917
|
+
"type": "CHAR(36)",
|
|
2918
|
+
"nullable": false
|
|
2919
|
+
},
|
|
2920
|
+
{
|
|
2921
|
+
"name": "diagram_policy_code",
|
|
2922
|
+
"type": "VARCHAR(128)",
|
|
2923
|
+
"nullable": false
|
|
2924
|
+
},
|
|
2925
|
+
{
|
|
2926
|
+
"name": "notation_code",
|
|
2927
|
+
"type": "VARCHAR(64)",
|
|
2928
|
+
"nullable": false,
|
|
2929
|
+
"default": "'ANY'"
|
|
2930
|
+
},
|
|
2931
|
+
{
|
|
2932
|
+
"name": "source_required",
|
|
2933
|
+
"type": "INTEGER",
|
|
2934
|
+
"nullable": false,
|
|
2935
|
+
"default": "1"
|
|
2936
|
+
},
|
|
2937
|
+
{
|
|
2938
|
+
"name": "render_output_required",
|
|
2939
|
+
"type": "INTEGER",
|
|
2940
|
+
"nullable": false,
|
|
2941
|
+
"default": "0"
|
|
2942
|
+
},
|
|
2943
|
+
{
|
|
2944
|
+
"name": "description",
|
|
2945
|
+
"type": "TEXT",
|
|
2946
|
+
"nullable": true
|
|
2947
|
+
},
|
|
2948
|
+
{
|
|
2949
|
+
"name": "created_at",
|
|
2950
|
+
"type": "DATETIME",
|
|
2951
|
+
"nullable": false,
|
|
2952
|
+
"default": "CURRENT_TIMESTAMP"
|
|
2953
|
+
},
|
|
2954
|
+
{
|
|
2955
|
+
"name": "updated_at",
|
|
2956
|
+
"type": "DATETIME",
|
|
2957
|
+
"nullable": false,
|
|
2958
|
+
"default": "CURRENT_TIMESTAMP"
|
|
2959
|
+
},
|
|
2960
|
+
{
|
|
2961
|
+
"name": "metadata_json",
|
|
2962
|
+
"type": "JSON",
|
|
2963
|
+
"nullable": true
|
|
2964
|
+
}
|
|
2965
|
+
],
|
|
2966
|
+
"indexes": [
|
|
2967
|
+
{
|
|
2968
|
+
"name": "sqlite_autoindex_artifact_standard_diagram_policies_2",
|
|
2969
|
+
"def": "UNIQUE (artifact_standard_id, diagram_policy_code)",
|
|
2970
|
+
"table": "artifact_standard_diagram_policies",
|
|
2971
|
+
"columns": [
|
|
2972
|
+
"artifact_standard_id",
|
|
2973
|
+
"diagram_policy_code"
|
|
2974
|
+
]
|
|
2975
|
+
},
|
|
2976
|
+
{
|
|
2977
|
+
"name": "sqlite_autoindex_artifact_standard_diagram_policies_1",
|
|
2978
|
+
"def": "PRIMARY KEY (diagram_policy_id)",
|
|
2979
|
+
"table": "artifact_standard_diagram_policies",
|
|
2980
|
+
"columns": [
|
|
2981
|
+
"diagram_policy_id"
|
|
2982
|
+
]
|
|
2983
|
+
}
|
|
2984
|
+
],
|
|
2985
|
+
"constraints": [
|
|
2986
|
+
{
|
|
2987
|
+
"name": "diagram_policy_id",
|
|
2988
|
+
"type": "PRIMARY KEY",
|
|
2989
|
+
"def": "PRIMARY KEY (diagram_policy_id)",
|
|
2990
|
+
"table": "artifact_standard_diagram_policies",
|
|
2991
|
+
"columns": [
|
|
2992
|
+
"diagram_policy_id"
|
|
2993
|
+
]
|
|
2994
|
+
},
|
|
2995
|
+
{
|
|
2996
|
+
"name": "- (Foreign key ID: 0)",
|
|
2997
|
+
"type": "FOREIGN KEY",
|
|
2998
|
+
"def": "FOREIGN KEY (artifact_standard_id) REFERENCES artifact_standard_standards (artifact_standard_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE",
|
|
2999
|
+
"table": "artifact_standard_diagram_policies",
|
|
3000
|
+
"referenced_table": "artifact_standard_standards",
|
|
3001
|
+
"columns": [
|
|
3002
|
+
"artifact_standard_id"
|
|
3003
|
+
],
|
|
3004
|
+
"referenced_columns": [
|
|
3005
|
+
"artifact_standard_id"
|
|
3006
|
+
]
|
|
3007
|
+
},
|
|
3008
|
+
{
|
|
3009
|
+
"name": "sqlite_autoindex_artifact_standard_diagram_policies_2",
|
|
3010
|
+
"type": "UNIQUE",
|
|
3011
|
+
"def": "UNIQUE (artifact_standard_id, diagram_policy_code)",
|
|
3012
|
+
"table": "artifact_standard_diagram_policies",
|
|
3013
|
+
"columns": [
|
|
3014
|
+
"artifact_standard_id",
|
|
3015
|
+
"diagram_policy_code"
|
|
3016
|
+
]
|
|
3017
|
+
},
|
|
3018
|
+
{
|
|
3019
|
+
"name": "sqlite_autoindex_artifact_standard_diagram_policies_1",
|
|
3020
|
+
"type": "PRIMARY KEY",
|
|
3021
|
+
"def": "PRIMARY KEY (diagram_policy_id)",
|
|
3022
|
+
"table": "artifact_standard_diagram_policies",
|
|
3023
|
+
"columns": [
|
|
3024
|
+
"diagram_policy_id"
|
|
3025
|
+
]
|
|
3026
|
+
},
|
|
3027
|
+
{
|
|
3028
|
+
"name": "-",
|
|
3029
|
+
"type": "CHECK",
|
|
3030
|
+
"def": "CHECK (length(diagram_policy_id) = 36)",
|
|
3031
|
+
"table": "artifact_standard_diagram_policies",
|
|
3032
|
+
"columns": [
|
|
3033
|
+
"diagram_policy_id"
|
|
3034
|
+
]
|
|
3035
|
+
},
|
|
3036
|
+
{
|
|
3037
|
+
"name": "-",
|
|
3038
|
+
"type": "CHECK",
|
|
3039
|
+
"def": "CHECK (length(artifact_standard_id) = 36)",
|
|
3040
|
+
"table": "artifact_standard_diagram_policies",
|
|
3041
|
+
"columns": [
|
|
3042
|
+
"artifact_standard_id"
|
|
3043
|
+
]
|
|
3044
|
+
},
|
|
3045
|
+
{
|
|
3046
|
+
"name": "-",
|
|
3047
|
+
"type": "CHECK",
|
|
3048
|
+
"def": "CHECK (source_required IN (0, 1))",
|
|
3049
|
+
"table": "artifact_standard_diagram_policies",
|
|
3050
|
+
"columns": [
|
|
3051
|
+
"source_required"
|
|
3052
|
+
]
|
|
3053
|
+
},
|
|
3054
|
+
{
|
|
3055
|
+
"name": "-",
|
|
3056
|
+
"type": "CHECK",
|
|
3057
|
+
"def": "CHECK (render_output_required IN (0, 1))",
|
|
3058
|
+
"table": "artifact_standard_diagram_policies",
|
|
3059
|
+
"columns": [
|
|
3060
|
+
"render_output_required"
|
|
3061
|
+
]
|
|
3062
|
+
},
|
|
3063
|
+
{
|
|
3064
|
+
"name": "-",
|
|
3065
|
+
"type": "CHECK",
|
|
3066
|
+
"def": "CHECK (metadata_json IS NULL OR json_valid(metadata_json))",
|
|
3067
|
+
"table": "artifact_standard_diagram_policies",
|
|
3068
|
+
"columns": [
|
|
3069
|
+
"metadata_json"
|
|
3070
|
+
]
|
|
3071
|
+
}
|
|
3072
|
+
],
|
|
3073
|
+
"def": "CREATE TABLE artifact_standard_diagram_policies (\n -- diagram policy 식별자\n diagram_policy_id CHAR(36) PRIMARY KEY\n CHECK (length(diagram_policy_id) = 36),\n\n -- 소속 산출물 표준 식별자\n artifact_standard_id CHAR(36) NOT NULL\n CHECK (length(artifact_standard_id) = 36),\n\n -- diagram policy 코드\n diagram_policy_code VARCHAR(128) NOT NULL,\n\n -- notation 코드. 기본값은 ANY\n notation_code VARCHAR(64) NOT NULL DEFAULT 'ANY',\n\n -- source text 또는 path 필수 여부\n source_required INTEGER NOT NULL DEFAULT 1\n CHECK (source_required IN (0, 1)),\n\n -- render output 필수 여부\n render_output_required INTEGER NOT NULL DEFAULT 0\n CHECK (render_output_required IN (0, 1)),\n\n -- 설명\n description TEXT,\n\n -- 생성 시각\n created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 수정 시각\n updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 확장 메타데이터\n metadata_json JSON\n CHECK (metadata_json IS NULL OR json_valid(metadata_json)),\n\n FOREIGN KEY (artifact_standard_id)\n REFERENCES artifact_standard_standards (artifact_standard_id)\n ON DELETE CASCADE,\n\n UNIQUE (artifact_standard_id, diagram_policy_code)\n)"
|
|
3074
|
+
},
|
|
3075
|
+
{
|
|
3076
|
+
"name": "artifact_standard_validation_rule_sets",
|
|
3077
|
+
"type": "table",
|
|
3078
|
+
"comment": "산출물 표준에 적용할 validation rule set을 관리한다.",
|
|
3079
|
+
"columns": [
|
|
3080
|
+
{
|
|
3081
|
+
"name": "validation_rule_set_id",
|
|
3082
|
+
"type": "CHAR(36)",
|
|
3083
|
+
"nullable": true
|
|
3084
|
+
},
|
|
3085
|
+
{
|
|
3086
|
+
"name": "artifact_standard_id",
|
|
3087
|
+
"type": "CHAR(36)",
|
|
3088
|
+
"nullable": false
|
|
3089
|
+
},
|
|
3090
|
+
{
|
|
3091
|
+
"name": "rule_set_code",
|
|
3092
|
+
"type": "VARCHAR(128)",
|
|
3093
|
+
"nullable": false
|
|
3094
|
+
},
|
|
3095
|
+
{
|
|
3096
|
+
"name": "rule_set_name",
|
|
3097
|
+
"type": "VARCHAR(256)",
|
|
3098
|
+
"nullable": false
|
|
3099
|
+
},
|
|
3100
|
+
{
|
|
3101
|
+
"name": "target_domain",
|
|
3102
|
+
"type": "VARCHAR(128)",
|
|
3103
|
+
"nullable": false,
|
|
3104
|
+
"default": "'artifact-standard'"
|
|
3105
|
+
},
|
|
3106
|
+
{
|
|
3107
|
+
"name": "description",
|
|
3108
|
+
"type": "TEXT",
|
|
3109
|
+
"nullable": true
|
|
3110
|
+
},
|
|
3111
|
+
{
|
|
3112
|
+
"name": "created_at",
|
|
3113
|
+
"type": "DATETIME",
|
|
3114
|
+
"nullable": false,
|
|
3115
|
+
"default": "CURRENT_TIMESTAMP"
|
|
3116
|
+
},
|
|
3117
|
+
{
|
|
3118
|
+
"name": "updated_at",
|
|
3119
|
+
"type": "DATETIME",
|
|
3120
|
+
"nullable": false,
|
|
3121
|
+
"default": "CURRENT_TIMESTAMP"
|
|
3122
|
+
},
|
|
3123
|
+
{
|
|
3124
|
+
"name": "metadata_json",
|
|
3125
|
+
"type": "JSON",
|
|
3126
|
+
"nullable": true
|
|
3127
|
+
}
|
|
3128
|
+
],
|
|
3129
|
+
"indexes": [
|
|
3130
|
+
{
|
|
3131
|
+
"name": "sqlite_autoindex_artifact_standard_validation_rule_sets_2",
|
|
3132
|
+
"def": "UNIQUE (artifact_standard_id, rule_set_code)",
|
|
3133
|
+
"table": "artifact_standard_validation_rule_sets",
|
|
3134
|
+
"columns": [
|
|
3135
|
+
"artifact_standard_id",
|
|
3136
|
+
"rule_set_code"
|
|
3137
|
+
]
|
|
3138
|
+
},
|
|
3139
|
+
{
|
|
3140
|
+
"name": "sqlite_autoindex_artifact_standard_validation_rule_sets_1",
|
|
3141
|
+
"def": "PRIMARY KEY (validation_rule_set_id)",
|
|
3142
|
+
"table": "artifact_standard_validation_rule_sets",
|
|
3143
|
+
"columns": [
|
|
3144
|
+
"validation_rule_set_id"
|
|
3145
|
+
]
|
|
3146
|
+
}
|
|
3147
|
+
],
|
|
3148
|
+
"constraints": [
|
|
3149
|
+
{
|
|
3150
|
+
"name": "validation_rule_set_id",
|
|
3151
|
+
"type": "PRIMARY KEY",
|
|
3152
|
+
"def": "PRIMARY KEY (validation_rule_set_id)",
|
|
3153
|
+
"table": "artifact_standard_validation_rule_sets",
|
|
3154
|
+
"columns": [
|
|
3155
|
+
"validation_rule_set_id"
|
|
3156
|
+
]
|
|
3157
|
+
},
|
|
3158
|
+
{
|
|
3159
|
+
"name": "- (Foreign key ID: 0)",
|
|
3160
|
+
"type": "FOREIGN KEY",
|
|
3161
|
+
"def": "FOREIGN KEY (artifact_standard_id) REFERENCES artifact_standard_standards (artifact_standard_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE",
|
|
3162
|
+
"table": "artifact_standard_validation_rule_sets",
|
|
3163
|
+
"referenced_table": "artifact_standard_standards",
|
|
3164
|
+
"columns": [
|
|
3165
|
+
"artifact_standard_id"
|
|
3166
|
+
],
|
|
3167
|
+
"referenced_columns": [
|
|
3168
|
+
"artifact_standard_id"
|
|
3169
|
+
]
|
|
3170
|
+
},
|
|
3171
|
+
{
|
|
3172
|
+
"name": "sqlite_autoindex_artifact_standard_validation_rule_sets_2",
|
|
3173
|
+
"type": "UNIQUE",
|
|
3174
|
+
"def": "UNIQUE (artifact_standard_id, rule_set_code)",
|
|
3175
|
+
"table": "artifact_standard_validation_rule_sets",
|
|
3176
|
+
"columns": [
|
|
3177
|
+
"artifact_standard_id",
|
|
3178
|
+
"rule_set_code"
|
|
3179
|
+
]
|
|
3180
|
+
},
|
|
3181
|
+
{
|
|
3182
|
+
"name": "sqlite_autoindex_artifact_standard_validation_rule_sets_1",
|
|
3183
|
+
"type": "PRIMARY KEY",
|
|
3184
|
+
"def": "PRIMARY KEY (validation_rule_set_id)",
|
|
3185
|
+
"table": "artifact_standard_validation_rule_sets",
|
|
3186
|
+
"columns": [
|
|
3187
|
+
"validation_rule_set_id"
|
|
3188
|
+
]
|
|
3189
|
+
},
|
|
3190
|
+
{
|
|
3191
|
+
"name": "-",
|
|
3192
|
+
"type": "CHECK",
|
|
3193
|
+
"def": "CHECK (length(validation_rule_set_id) = 36)",
|
|
3194
|
+
"table": "artifact_standard_validation_rule_sets",
|
|
3195
|
+
"columns": [
|
|
3196
|
+
"validation_rule_set_id"
|
|
3197
|
+
]
|
|
3198
|
+
},
|
|
3199
|
+
{
|
|
3200
|
+
"name": "-",
|
|
3201
|
+
"type": "CHECK",
|
|
3202
|
+
"def": "CHECK (length(artifact_standard_id) = 36)",
|
|
3203
|
+
"table": "artifact_standard_validation_rule_sets",
|
|
3204
|
+
"columns": [
|
|
3205
|
+
"artifact_standard_id"
|
|
3206
|
+
]
|
|
3207
|
+
},
|
|
3208
|
+
{
|
|
3209
|
+
"name": "-",
|
|
3210
|
+
"type": "CHECK",
|
|
3211
|
+
"def": "CHECK (metadata_json IS NULL OR json_valid(metadata_json))",
|
|
3212
|
+
"table": "artifact_standard_validation_rule_sets",
|
|
3213
|
+
"columns": [
|
|
3214
|
+
"metadata_json"
|
|
3215
|
+
]
|
|
3216
|
+
}
|
|
3217
|
+
],
|
|
3218
|
+
"def": "CREATE TABLE artifact_standard_validation_rule_sets (\n -- validation rule set 식별자\n validation_rule_set_id CHAR(36) PRIMARY KEY\n CHECK (length(validation_rule_set_id) = 36),\n\n -- 소속 산출물 표준 식별자\n artifact_standard_id CHAR(36) NOT NULL\n CHECK (length(artifact_standard_id) = 36),\n\n -- rule set 코드\n rule_set_code VARCHAR(128) NOT NULL,\n\n -- rule set 이름\n rule_set_name VARCHAR(256) NOT NULL,\n\n -- target domain\n target_domain VARCHAR(128) NOT NULL DEFAULT 'artifact-standard',\n\n -- 설명\n description TEXT,\n\n -- 생성 시각\n created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 수정 시각\n updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 확장 메타데이터\n metadata_json JSON\n CHECK (metadata_json IS NULL OR json_valid(metadata_json)),\n\n FOREIGN KEY (artifact_standard_id)\n REFERENCES artifact_standard_standards (artifact_standard_id)\n ON DELETE CASCADE,\n\n UNIQUE (artifact_standard_id, rule_set_code)\n)"
|
|
3219
|
+
},
|
|
3220
|
+
{
|
|
3221
|
+
"name": "artifact_standard_validation_rule_set_rules",
|
|
3222
|
+
"type": "table",
|
|
3223
|
+
"comment": "validation rule set에 포함된 contract-compatible rule을 관리한다.",
|
|
3224
|
+
"columns": [
|
|
3225
|
+
{
|
|
3226
|
+
"name": "validation_rule_set_rule_id",
|
|
3227
|
+
"type": "CHAR(36)",
|
|
3228
|
+
"nullable": true
|
|
3229
|
+
},
|
|
3230
|
+
{
|
|
3231
|
+
"name": "validation_rule_set_id",
|
|
3232
|
+
"type": "CHAR(36)",
|
|
3233
|
+
"nullable": false
|
|
3234
|
+
},
|
|
3235
|
+
{
|
|
3236
|
+
"name": "rule_id",
|
|
3237
|
+
"type": "VARCHAR(256)",
|
|
3238
|
+
"nullable": false
|
|
3239
|
+
},
|
|
3240
|
+
{
|
|
3241
|
+
"name": "validation_type_code",
|
|
3242
|
+
"type": "VARCHAR(64)",
|
|
3243
|
+
"nullable": false
|
|
3244
|
+
},
|
|
3245
|
+
{
|
|
3246
|
+
"name": "execution_mode_code",
|
|
3247
|
+
"type": "VARCHAR(64)",
|
|
3248
|
+
"nullable": false
|
|
3249
|
+
},
|
|
3250
|
+
{
|
|
3251
|
+
"name": "severity_code",
|
|
3252
|
+
"type": "VARCHAR(64)",
|
|
3253
|
+
"nullable": false
|
|
3254
|
+
},
|
|
3255
|
+
{
|
|
3256
|
+
"name": "applies_to_type_code",
|
|
3257
|
+
"type": "VARCHAR(128)",
|
|
3258
|
+
"nullable": false
|
|
3259
|
+
},
|
|
3260
|
+
{
|
|
3261
|
+
"name": "applies_to_ref",
|
|
3262
|
+
"type": "VARCHAR(256)",
|
|
3263
|
+
"nullable": true
|
|
3264
|
+
},
|
|
3265
|
+
{
|
|
3266
|
+
"name": "source_component_ref",
|
|
3267
|
+
"type": "VARCHAR(256)",
|
|
3268
|
+
"nullable": true
|
|
3269
|
+
},
|
|
3270
|
+
{
|
|
3271
|
+
"name": "parameters_json",
|
|
3272
|
+
"type": "JSON",
|
|
3273
|
+
"nullable": true
|
|
3274
|
+
},
|
|
3275
|
+
{
|
|
3276
|
+
"name": "message",
|
|
3277
|
+
"type": "TEXT",
|
|
3278
|
+
"nullable": false
|
|
3279
|
+
},
|
|
3280
|
+
{
|
|
3281
|
+
"name": "remediation",
|
|
3282
|
+
"type": "TEXT",
|
|
3283
|
+
"nullable": true
|
|
3284
|
+
},
|
|
3285
|
+
{
|
|
3286
|
+
"name": "sort_order",
|
|
3287
|
+
"type": "INTEGER",
|
|
3288
|
+
"nullable": false,
|
|
3289
|
+
"default": "0"
|
|
3290
|
+
},
|
|
3291
|
+
{
|
|
3292
|
+
"name": "is_active",
|
|
3293
|
+
"type": "INTEGER",
|
|
3294
|
+
"nullable": false,
|
|
3295
|
+
"default": "1"
|
|
3296
|
+
},
|
|
3297
|
+
{
|
|
3298
|
+
"name": "created_at",
|
|
3299
|
+
"type": "DATETIME",
|
|
3300
|
+
"nullable": false,
|
|
3301
|
+
"default": "CURRENT_TIMESTAMP"
|
|
3302
|
+
},
|
|
3303
|
+
{
|
|
3304
|
+
"name": "updated_at",
|
|
3305
|
+
"type": "DATETIME",
|
|
3306
|
+
"nullable": false,
|
|
3307
|
+
"default": "CURRENT_TIMESTAMP"
|
|
3308
|
+
},
|
|
3309
|
+
{
|
|
3310
|
+
"name": "metadata_json",
|
|
3311
|
+
"type": "JSON",
|
|
3312
|
+
"nullable": true
|
|
3313
|
+
}
|
|
3314
|
+
],
|
|
3315
|
+
"indexes": [
|
|
3316
|
+
{
|
|
3317
|
+
"name": "idx_artifact_standard_rule_set_rules_rule_set",
|
|
3318
|
+
"def": "CREATE INDEX idx_artifact_standard_rule_set_rules_rule_set\n ON artifact_standard_validation_rule_set_rules (validation_rule_set_id)",
|
|
3319
|
+
"table": "artifact_standard_validation_rule_set_rules",
|
|
3320
|
+
"columns": [
|
|
3321
|
+
"validation_rule_set_id"
|
|
3322
|
+
]
|
|
3323
|
+
},
|
|
3324
|
+
{
|
|
3325
|
+
"name": "sqlite_autoindex_artifact_standard_validation_rule_set_rules_2",
|
|
3326
|
+
"def": "UNIQUE (validation_rule_set_id, rule_id)",
|
|
3327
|
+
"table": "artifact_standard_validation_rule_set_rules",
|
|
3328
|
+
"columns": [
|
|
3329
|
+
"validation_rule_set_id",
|
|
3330
|
+
"rule_id"
|
|
3331
|
+
]
|
|
3332
|
+
},
|
|
3333
|
+
{
|
|
3334
|
+
"name": "sqlite_autoindex_artifact_standard_validation_rule_set_rules_1",
|
|
3335
|
+
"def": "PRIMARY KEY (validation_rule_set_rule_id)",
|
|
3336
|
+
"table": "artifact_standard_validation_rule_set_rules",
|
|
3337
|
+
"columns": [
|
|
3338
|
+
"validation_rule_set_rule_id"
|
|
3339
|
+
]
|
|
3340
|
+
}
|
|
3341
|
+
],
|
|
3342
|
+
"constraints": [
|
|
3343
|
+
{
|
|
3344
|
+
"name": "validation_rule_set_rule_id",
|
|
3345
|
+
"type": "PRIMARY KEY",
|
|
3346
|
+
"def": "PRIMARY KEY (validation_rule_set_rule_id)",
|
|
3347
|
+
"table": "artifact_standard_validation_rule_set_rules",
|
|
3348
|
+
"columns": [
|
|
3349
|
+
"validation_rule_set_rule_id"
|
|
3350
|
+
]
|
|
3351
|
+
},
|
|
3352
|
+
{
|
|
3353
|
+
"name": "- (Foreign key ID: 0)",
|
|
3354
|
+
"type": "FOREIGN KEY",
|
|
3355
|
+
"def": "FOREIGN KEY (validation_rule_set_id) REFERENCES artifact_standard_validation_rule_sets (validation_rule_set_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE",
|
|
3356
|
+
"table": "artifact_standard_validation_rule_set_rules",
|
|
3357
|
+
"referenced_table": "artifact_standard_validation_rule_sets",
|
|
3358
|
+
"columns": [
|
|
3359
|
+
"validation_rule_set_id"
|
|
3360
|
+
],
|
|
3361
|
+
"referenced_columns": [
|
|
3362
|
+
"validation_rule_set_id"
|
|
3363
|
+
]
|
|
3364
|
+
},
|
|
3365
|
+
{
|
|
3366
|
+
"name": "sqlite_autoindex_artifact_standard_validation_rule_set_rules_2",
|
|
3367
|
+
"type": "UNIQUE",
|
|
3368
|
+
"def": "UNIQUE (validation_rule_set_id, rule_id)",
|
|
3369
|
+
"table": "artifact_standard_validation_rule_set_rules",
|
|
3370
|
+
"columns": [
|
|
3371
|
+
"validation_rule_set_id",
|
|
3372
|
+
"rule_id"
|
|
3373
|
+
]
|
|
3374
|
+
},
|
|
3375
|
+
{
|
|
3376
|
+
"name": "sqlite_autoindex_artifact_standard_validation_rule_set_rules_1",
|
|
3377
|
+
"type": "PRIMARY KEY",
|
|
3378
|
+
"def": "PRIMARY KEY (validation_rule_set_rule_id)",
|
|
3379
|
+
"table": "artifact_standard_validation_rule_set_rules",
|
|
3380
|
+
"columns": [
|
|
3381
|
+
"validation_rule_set_rule_id"
|
|
3382
|
+
]
|
|
3383
|
+
},
|
|
3384
|
+
{
|
|
3385
|
+
"name": "-",
|
|
3386
|
+
"type": "CHECK",
|
|
3387
|
+
"def": "CHECK (length(validation_rule_set_rule_id) = 36)",
|
|
3388
|
+
"table": "artifact_standard_validation_rule_set_rules",
|
|
3389
|
+
"columns": [
|
|
3390
|
+
"validation_rule_set_rule_id",
|
|
3391
|
+
"rule_id"
|
|
3392
|
+
]
|
|
3393
|
+
},
|
|
3394
|
+
{
|
|
3395
|
+
"name": "-",
|
|
3396
|
+
"type": "CHECK",
|
|
3397
|
+
"def": "CHECK (length(validation_rule_set_id) = 36)",
|
|
3398
|
+
"table": "artifact_standard_validation_rule_set_rules",
|
|
3399
|
+
"columns": [
|
|
3400
|
+
"validation_rule_set_id"
|
|
3401
|
+
]
|
|
3402
|
+
},
|
|
3403
|
+
{
|
|
3404
|
+
"name": "-",
|
|
3405
|
+
"type": "CHECK",
|
|
3406
|
+
"def": "CHECK (parameters_json IS NULL OR json_valid(parameters_json))",
|
|
3407
|
+
"table": "artifact_standard_validation_rule_set_rules",
|
|
3408
|
+
"columns": [
|
|
3409
|
+
"parameters_json"
|
|
3410
|
+
]
|
|
3411
|
+
},
|
|
3412
|
+
{
|
|
3413
|
+
"name": "-",
|
|
3414
|
+
"type": "CHECK",
|
|
3415
|
+
"def": "CHECK (is_active IN (0, 1))",
|
|
3416
|
+
"table": "artifact_standard_validation_rule_set_rules",
|
|
3417
|
+
"columns": [
|
|
3418
|
+
"is_active"
|
|
3419
|
+
]
|
|
3420
|
+
},
|
|
3421
|
+
{
|
|
3422
|
+
"name": "-",
|
|
3423
|
+
"type": "CHECK",
|
|
3424
|
+
"def": "CHECK (metadata_json IS NULL OR json_valid(metadata_json))",
|
|
3425
|
+
"table": "artifact_standard_validation_rule_set_rules",
|
|
3426
|
+
"columns": [
|
|
3427
|
+
"metadata_json"
|
|
3428
|
+
]
|
|
3429
|
+
}
|
|
3430
|
+
],
|
|
3431
|
+
"def": "CREATE TABLE artifact_standard_validation_rule_set_rules (\n -- validation rule set rule 식별자\n validation_rule_set_rule_id CHAR(36) PRIMARY KEY\n CHECK (length(validation_rule_set_rule_id) = 36),\n\n -- 소속 validation rule set 식별자\n validation_rule_set_id CHAR(36) NOT NULL\n CHECK (length(validation_rule_set_id) = 36),\n\n -- rule 식별자\n rule_id VARCHAR(256) NOT NULL,\n\n -- validation type 코드. agentic-contract-validation과 정렬한다.\n validation_type_code VARCHAR(64) NOT NULL,\n\n -- execution mode 코드. agentic-contract-validation과 정렬한다.\n execution_mode_code VARCHAR(64) NOT NULL,\n\n -- severity 코드. agentic-contract-validation과 정렬한다.\n severity_code VARCHAR(64) NOT NULL,\n\n -- 적용 대상 유형 코드\n applies_to_type_code VARCHAR(128) NOT NULL,\n\n -- 적용 대상 참조\n applies_to_ref VARCHAR(256),\n\n -- source component 참조\n source_component_ref VARCHAR(256),\n\n -- rule parameter\n parameters_json JSON\n CHECK (parameters_json IS NULL OR json_valid(parameters_json)),\n\n -- 위반 메시지\n message TEXT NOT NULL,\n\n -- 해결 가이드\n remediation TEXT,\n\n -- 표시 정렬 순서\n sort_order INTEGER NOT NULL DEFAULT 0,\n\n -- 활성 여부\n is_active INTEGER NOT NULL DEFAULT 1\n CHECK (is_active IN (0, 1)),\n\n -- 생성 시각\n created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 수정 시각\n updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 확장 메타데이터\n metadata_json JSON\n CHECK (metadata_json IS NULL OR json_valid(metadata_json)),\n\n FOREIGN KEY (validation_rule_set_id)\n REFERENCES artifact_standard_validation_rule_sets (validation_rule_set_id)\n ON DELETE CASCADE,\n\n UNIQUE (validation_rule_set_id, rule_id)\n)"
|
|
3432
|
+
},
|
|
3433
|
+
{
|
|
3434
|
+
"name": "artifact_standard_generated_output_links",
|
|
3435
|
+
"type": "table",
|
|
3436
|
+
"columns": [
|
|
3437
|
+
{
|
|
3438
|
+
"name": "generated_output_link_id",
|
|
3439
|
+
"type": "CHAR(36)",
|
|
3440
|
+
"nullable": true
|
|
3441
|
+
},
|
|
3442
|
+
{
|
|
3443
|
+
"name": "link_code",
|
|
3444
|
+
"type": "VARCHAR(128)",
|
|
3445
|
+
"nullable": false
|
|
3446
|
+
},
|
|
3447
|
+
{
|
|
3448
|
+
"name": "source_artifact_standard_id",
|
|
3449
|
+
"type": "CHAR(36)",
|
|
3450
|
+
"nullable": false
|
|
3451
|
+
},
|
|
3452
|
+
{
|
|
3453
|
+
"name": "source_artifact_standard_code",
|
|
3454
|
+
"type": "VARCHAR(128)",
|
|
3455
|
+
"nullable": false
|
|
3456
|
+
},
|
|
3457
|
+
{
|
|
3458
|
+
"name": "source_artifact_standard_version",
|
|
3459
|
+
"type": "VARCHAR(64)",
|
|
3460
|
+
"nullable": false
|
|
3461
|
+
},
|
|
3462
|
+
{
|
|
3463
|
+
"name": "target_type_code",
|
|
3464
|
+
"type": "VARCHAR(64)",
|
|
3465
|
+
"nullable": false
|
|
3466
|
+
},
|
|
3467
|
+
{
|
|
3468
|
+
"name": "target_artifact_standard_id",
|
|
3469
|
+
"type": "CHAR(36)",
|
|
3470
|
+
"nullable": true
|
|
3471
|
+
},
|
|
3472
|
+
{
|
|
3473
|
+
"name": "target_artifact_standard_code",
|
|
3474
|
+
"type": "VARCHAR(128)",
|
|
3475
|
+
"nullable": true
|
|
3476
|
+
},
|
|
3477
|
+
{
|
|
3478
|
+
"name": "target_artifact_standard_version",
|
|
3479
|
+
"type": "VARCHAR(64)",
|
|
3480
|
+
"nullable": true
|
|
3481
|
+
},
|
|
3482
|
+
{
|
|
3483
|
+
"name": "target_output_name",
|
|
3484
|
+
"type": "VARCHAR(256)",
|
|
3485
|
+
"nullable": true
|
|
3486
|
+
},
|
|
3487
|
+
{
|
|
3488
|
+
"name": "generation_mode_code",
|
|
3489
|
+
"type": "VARCHAR(64)",
|
|
3490
|
+
"nullable": false,
|
|
3491
|
+
"default": "'AUTOMATIC'"
|
|
3492
|
+
},
|
|
3493
|
+
{
|
|
3494
|
+
"name": "sort_order",
|
|
3495
|
+
"type": "INTEGER",
|
|
3496
|
+
"nullable": false,
|
|
3497
|
+
"default": "0"
|
|
3498
|
+
},
|
|
3499
|
+
{
|
|
3500
|
+
"name": "description",
|
|
3501
|
+
"type": "TEXT",
|
|
3502
|
+
"nullable": true
|
|
3503
|
+
},
|
|
3504
|
+
{
|
|
3505
|
+
"name": "is_active",
|
|
3506
|
+
"type": "INTEGER",
|
|
3507
|
+
"nullable": false,
|
|
3508
|
+
"default": "1"
|
|
3509
|
+
},
|
|
3510
|
+
{
|
|
3511
|
+
"name": "created_at",
|
|
3512
|
+
"type": "DATETIME",
|
|
3513
|
+
"nullable": false,
|
|
3514
|
+
"default": "CURRENT_TIMESTAMP"
|
|
3515
|
+
},
|
|
3516
|
+
{
|
|
3517
|
+
"name": "updated_at",
|
|
3518
|
+
"type": "DATETIME",
|
|
3519
|
+
"nullable": false,
|
|
3520
|
+
"default": "CURRENT_TIMESTAMP"
|
|
3521
|
+
},
|
|
3522
|
+
{
|
|
3523
|
+
"name": "metadata_json",
|
|
3524
|
+
"type": "JSON",
|
|
3525
|
+
"nullable": true
|
|
3526
|
+
}
|
|
3527
|
+
],
|
|
3528
|
+
"indexes": [
|
|
3529
|
+
{
|
|
3530
|
+
"name": "idx_artifact_standard_generated_output_links_target_artifact",
|
|
3531
|
+
"def": "CREATE INDEX idx_artifact_standard_generated_output_links_target_artifact\n ON artifact_standard_generated_output_links (target_artifact_standard_id)",
|
|
3532
|
+
"table": "artifact_standard_generated_output_links",
|
|
3533
|
+
"columns": [
|
|
3534
|
+
"target_artifact_standard_id"
|
|
3535
|
+
]
|
|
3536
|
+
},
|
|
3537
|
+
{
|
|
3538
|
+
"name": "idx_artifact_standard_generated_output_links_source",
|
|
3539
|
+
"def": "CREATE INDEX idx_artifact_standard_generated_output_links_source\n ON artifact_standard_generated_output_links (source_artifact_standard_id)",
|
|
3540
|
+
"table": "artifact_standard_generated_output_links",
|
|
3541
|
+
"columns": [
|
|
3542
|
+
"source_artifact_standard_id"
|
|
3543
|
+
]
|
|
3544
|
+
},
|
|
3545
|
+
{
|
|
3546
|
+
"name": "sqlite_autoindex_artifact_standard_generated_output_links_3",
|
|
3547
|
+
"def": "UNIQUE (source_artifact_standard_id, target_type_code, target_artifact_standard_code, target_artifact_standard_version, target_output_name)",
|
|
3548
|
+
"table": "artifact_standard_generated_output_links",
|
|
3549
|
+
"columns": [
|
|
3550
|
+
"source_artifact_standard_id",
|
|
3551
|
+
"target_type_code",
|
|
3552
|
+
"target_artifact_standard_code",
|
|
3553
|
+
"target_artifact_standard_version",
|
|
3554
|
+
"target_output_name"
|
|
3555
|
+
]
|
|
3556
|
+
},
|
|
3557
|
+
{
|
|
3558
|
+
"name": "sqlite_autoindex_artifact_standard_generated_output_links_2",
|
|
3559
|
+
"def": "UNIQUE (link_code)",
|
|
3560
|
+
"table": "artifact_standard_generated_output_links",
|
|
3561
|
+
"columns": [
|
|
3562
|
+
"link_code"
|
|
3563
|
+
]
|
|
3564
|
+
},
|
|
3565
|
+
{
|
|
3566
|
+
"name": "sqlite_autoindex_artifact_standard_generated_output_links_1",
|
|
3567
|
+
"def": "PRIMARY KEY (generated_output_link_id)",
|
|
3568
|
+
"table": "artifact_standard_generated_output_links",
|
|
3569
|
+
"columns": [
|
|
3570
|
+
"generated_output_link_id"
|
|
3571
|
+
]
|
|
3572
|
+
}
|
|
3573
|
+
],
|
|
3574
|
+
"constraints": [
|
|
3575
|
+
{
|
|
3576
|
+
"name": "generated_output_link_id",
|
|
3577
|
+
"type": "PRIMARY KEY",
|
|
3578
|
+
"def": "PRIMARY KEY (generated_output_link_id)",
|
|
3579
|
+
"table": "artifact_standard_generated_output_links",
|
|
3580
|
+
"columns": [
|
|
3581
|
+
"generated_output_link_id"
|
|
3582
|
+
]
|
|
3583
|
+
},
|
|
3584
|
+
{
|
|
3585
|
+
"name": "- (Foreign key ID: 0)",
|
|
3586
|
+
"type": "FOREIGN KEY",
|
|
3587
|
+
"def": "FOREIGN KEY (target_artifact_standard_id) REFERENCES artifact_standard_standards (artifact_standard_id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE",
|
|
3588
|
+
"table": "artifact_standard_generated_output_links",
|
|
3589
|
+
"referenced_table": "artifact_standard_standards",
|
|
3590
|
+
"columns": [
|
|
3591
|
+
"target_artifact_standard_id"
|
|
3592
|
+
],
|
|
3593
|
+
"referenced_columns": [
|
|
3594
|
+
"artifact_standard_id"
|
|
3595
|
+
]
|
|
3596
|
+
},
|
|
3597
|
+
{
|
|
3598
|
+
"name": "- (Foreign key ID: 1)",
|
|
3599
|
+
"type": "FOREIGN KEY",
|
|
3600
|
+
"def": "FOREIGN KEY (source_artifact_standard_id) REFERENCES artifact_standard_standards (artifact_standard_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE",
|
|
3601
|
+
"table": "artifact_standard_generated_output_links",
|
|
3602
|
+
"referenced_table": "artifact_standard_standards",
|
|
3603
|
+
"columns": [
|
|
3604
|
+
"source_artifact_standard_id"
|
|
3605
|
+
],
|
|
3606
|
+
"referenced_columns": [
|
|
3607
|
+
"artifact_standard_id"
|
|
3608
|
+
]
|
|
3609
|
+
},
|
|
3610
|
+
{
|
|
3611
|
+
"name": "sqlite_autoindex_artifact_standard_generated_output_links_3",
|
|
3612
|
+
"type": "UNIQUE",
|
|
3613
|
+
"def": "UNIQUE (source_artifact_standard_id, target_type_code, target_artifact_standard_code, target_artifact_standard_version, target_output_name)",
|
|
3614
|
+
"table": "artifact_standard_generated_output_links",
|
|
3615
|
+
"columns": [
|
|
3616
|
+
"source_artifact_standard_id",
|
|
3617
|
+
"target_type_code",
|
|
3618
|
+
"target_artifact_standard_code",
|
|
3619
|
+
"target_artifact_standard_version",
|
|
3620
|
+
"target_output_name"
|
|
3621
|
+
]
|
|
3622
|
+
},
|
|
3623
|
+
{
|
|
3624
|
+
"name": "sqlite_autoindex_artifact_standard_generated_output_links_2",
|
|
3625
|
+
"type": "UNIQUE",
|
|
3626
|
+
"def": "UNIQUE (link_code)",
|
|
3627
|
+
"table": "artifact_standard_generated_output_links",
|
|
3628
|
+
"columns": [
|
|
3629
|
+
"link_code"
|
|
3630
|
+
]
|
|
3631
|
+
},
|
|
3632
|
+
{
|
|
3633
|
+
"name": "sqlite_autoindex_artifact_standard_generated_output_links_1",
|
|
3634
|
+
"type": "PRIMARY KEY",
|
|
3635
|
+
"def": "PRIMARY KEY (generated_output_link_id)",
|
|
3636
|
+
"table": "artifact_standard_generated_output_links",
|
|
3637
|
+
"columns": [
|
|
3638
|
+
"generated_output_link_id"
|
|
3639
|
+
]
|
|
3640
|
+
},
|
|
3641
|
+
{
|
|
3642
|
+
"name": "-",
|
|
3643
|
+
"type": "CHECK",
|
|
3644
|
+
"def": "CHECK (length(generated_output_link_id) = 36)",
|
|
3645
|
+
"table": "artifact_standard_generated_output_links",
|
|
3646
|
+
"columns": [
|
|
3647
|
+
"generated_output_link_id"
|
|
3648
|
+
]
|
|
3649
|
+
},
|
|
3650
|
+
{
|
|
3651
|
+
"name": "-",
|
|
3652
|
+
"type": "CHECK",
|
|
3653
|
+
"def": "CHECK (length(source_artifact_standard_id) = 36)",
|
|
3654
|
+
"table": "artifact_standard_generated_output_links",
|
|
3655
|
+
"columns": [
|
|
3656
|
+
"source_artifact_standard_id"
|
|
3657
|
+
]
|
|
3658
|
+
},
|
|
3659
|
+
{
|
|
3660
|
+
"name": "-",
|
|
3661
|
+
"type": "CHECK",
|
|
3662
|
+
"def": "CHECK (target_type_code IN ('ARTIFACT', 'GENERATED_OUTPUT'))",
|
|
3663
|
+
"table": "artifact_standard_generated_output_links",
|
|
3664
|
+
"columns": [
|
|
3665
|
+
"target_type_code"
|
|
3666
|
+
]
|
|
3667
|
+
},
|
|
3668
|
+
{
|
|
3669
|
+
"name": "-",
|
|
3670
|
+
"type": "CHECK",
|
|
3671
|
+
"def": "CHECK (target_artifact_standard_id IS NULL OR length(target_artifact_standard_id) = 36)",
|
|
3672
|
+
"table": "artifact_standard_generated_output_links",
|
|
3673
|
+
"columns": [
|
|
3674
|
+
"target_artifact_standard_id"
|
|
3675
|
+
]
|
|
3676
|
+
},
|
|
3677
|
+
{
|
|
3678
|
+
"name": "-",
|
|
3679
|
+
"type": "CHECK",
|
|
3680
|
+
"def": "CHECK (is_active IN (0, 1))",
|
|
3681
|
+
"table": "artifact_standard_generated_output_links",
|
|
3682
|
+
"columns": [
|
|
3683
|
+
"is_active"
|
|
3684
|
+
]
|
|
3685
|
+
},
|
|
3686
|
+
{
|
|
3687
|
+
"name": "-",
|
|
3688
|
+
"type": "CHECK",
|
|
3689
|
+
"def": "CHECK (metadata_json IS NULL OR json_valid(metadata_json))",
|
|
3690
|
+
"table": "artifact_standard_generated_output_links",
|
|
3691
|
+
"columns": [
|
|
3692
|
+
"metadata_json"
|
|
3693
|
+
]
|
|
3694
|
+
}
|
|
3695
|
+
],
|
|
3696
|
+
"def": "CREATE TABLE artifact_standard_generated_output_links (\n -- generated output link 식별자\n generated_output_link_id CHAR(36) PRIMARY KEY\n CHECK (length(generated_output_link_id) = 36),\n\n -- link 코드\n link_code VARCHAR(128) NOT NULL,\n\n -- source 산출물 표준 식별자\n source_artifact_standard_id CHAR(36) NOT NULL\n CHECK (length(source_artifact_standard_id) = 36),\n\n -- source 산출물 표준 코드\n source_artifact_standard_code VARCHAR(128) NOT NULL,\n\n -- source 산출물 표준 버전\n source_artifact_standard_version VARCHAR(64) NOT NULL,\n\n -- target 유형 코드. 산출물 표준 또는 생성 출력물을 구분한다.\n target_type_code VARCHAR(64) NOT NULL\n CHECK (target_type_code IN ('ARTIFACT', 'GENERATED_OUTPUT')),\n\n -- target 산출물 표준 식별자. target이 ARTIFACT인 경우 사용한다.\n target_artifact_standard_id CHAR(36)\n CHECK (target_artifact_standard_id IS NULL OR length(target_artifact_standard_id) = 36),\n\n -- target 산출물 표준 코드\n target_artifact_standard_code VARCHAR(128),\n\n -- target 산출물 표준 버전\n target_artifact_standard_version VARCHAR(64),\n\n -- target 생성 출력명. target이 GENERATED_OUTPUT인 경우 사용한다.\n target_output_name VARCHAR(256),\n\n -- 생성 mode 코드\n generation_mode_code VARCHAR(64) NOT NULL DEFAULT 'AUTOMATIC',\n\n -- 표시 정렬 순서\n sort_order INTEGER NOT NULL DEFAULT 0,\n\n -- 설명\n description TEXT,\n\n -- 활성 여부\n is_active INTEGER NOT NULL DEFAULT 1\n CHECK (is_active IN (0, 1)),\n\n -- 생성 시각\n created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 수정 시각\n updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 확장 메타데이터\n metadata_json JSON\n CHECK (metadata_json IS NULL OR json_valid(metadata_json)),\n\n FOREIGN KEY (source_artifact_standard_id)\n REFERENCES artifact_standard_standards (artifact_standard_id)\n ON DELETE CASCADE,\n\n FOREIGN KEY (target_artifact_standard_id)\n REFERENCES artifact_standard_standards (artifact_standard_id)\n ON DELETE SET NULL,\n\n UNIQUE (link_code),\n\n UNIQUE (\n source_artifact_standard_id,\n target_type_code,\n target_artifact_standard_code,\n target_artifact_standard_version,\n target_output_name\n )\n)"
|
|
3697
|
+
},
|
|
3698
|
+
{
|
|
3699
|
+
"name": "artifact_standard_source_mappings",
|
|
3700
|
+
"type": "table",
|
|
3701
|
+
"comment": "설계 근거 및 후속 이행 후보 source mapping을 관리한다.",
|
|
3702
|
+
"columns": [
|
|
3703
|
+
{
|
|
3704
|
+
"name": "source_mapping_id",
|
|
3705
|
+
"type": "CHAR(36)",
|
|
3706
|
+
"nullable": true
|
|
3707
|
+
},
|
|
3708
|
+
{
|
|
3709
|
+
"name": "artifact_standard_id",
|
|
3710
|
+
"type": "CHAR(36)",
|
|
3711
|
+
"nullable": false
|
|
3712
|
+
},
|
|
3713
|
+
{
|
|
3714
|
+
"name": "source_type_code",
|
|
3715
|
+
"type": "VARCHAR(64)",
|
|
3716
|
+
"nullable": false
|
|
3717
|
+
},
|
|
3718
|
+
{
|
|
3719
|
+
"name": "source_uri",
|
|
3720
|
+
"type": "VARCHAR(1024)",
|
|
3721
|
+
"nullable": false
|
|
3722
|
+
},
|
|
3723
|
+
{
|
|
3724
|
+
"name": "source_label",
|
|
3725
|
+
"type": "VARCHAR(256)",
|
|
3726
|
+
"nullable": true
|
|
3727
|
+
},
|
|
3728
|
+
{
|
|
3729
|
+
"name": "source_section",
|
|
3730
|
+
"type": "VARCHAR(512)",
|
|
3731
|
+
"nullable": true
|
|
3732
|
+
},
|
|
3733
|
+
{
|
|
3734
|
+
"name": "source_fragment",
|
|
3735
|
+
"type": "TEXT",
|
|
3736
|
+
"nullable": true
|
|
3737
|
+
},
|
|
3738
|
+
{
|
|
3739
|
+
"name": "target_type_code",
|
|
3740
|
+
"type": "VARCHAR(128)",
|
|
3741
|
+
"nullable": false
|
|
3742
|
+
},
|
|
3743
|
+
{
|
|
3744
|
+
"name": "target_ref",
|
|
3745
|
+
"type": "VARCHAR(256)",
|
|
3746
|
+
"nullable": false
|
|
3747
|
+
},
|
|
3748
|
+
{
|
|
3749
|
+
"name": "mapping_type_code",
|
|
3750
|
+
"type": "VARCHAR(64)",
|
|
3751
|
+
"nullable": false
|
|
3752
|
+
},
|
|
3753
|
+
{
|
|
3754
|
+
"name": "mapping_status_code",
|
|
3755
|
+
"type": "VARCHAR(64)",
|
|
3756
|
+
"nullable": false,
|
|
3757
|
+
"default": "'CANDIDATE'"
|
|
3758
|
+
},
|
|
3759
|
+
{
|
|
3760
|
+
"name": "rationale",
|
|
3761
|
+
"type": "TEXT",
|
|
3762
|
+
"nullable": true
|
|
3763
|
+
},
|
|
3764
|
+
{
|
|
3765
|
+
"name": "loss_note",
|
|
3766
|
+
"type": "TEXT",
|
|
3767
|
+
"nullable": true
|
|
3768
|
+
},
|
|
3769
|
+
{
|
|
3770
|
+
"name": "follow_up_note",
|
|
3771
|
+
"type": "TEXT",
|
|
3772
|
+
"nullable": true
|
|
3773
|
+
},
|
|
3774
|
+
{
|
|
3775
|
+
"name": "created_at",
|
|
3776
|
+
"type": "DATETIME",
|
|
3777
|
+
"nullable": false,
|
|
3778
|
+
"default": "CURRENT_TIMESTAMP"
|
|
3779
|
+
},
|
|
3780
|
+
{
|
|
3781
|
+
"name": "updated_at",
|
|
3782
|
+
"type": "DATETIME",
|
|
3783
|
+
"nullable": false,
|
|
3784
|
+
"default": "CURRENT_TIMESTAMP"
|
|
3785
|
+
},
|
|
3786
|
+
{
|
|
3787
|
+
"name": "metadata_json",
|
|
3788
|
+
"type": "JSON",
|
|
3789
|
+
"nullable": true
|
|
3790
|
+
}
|
|
3791
|
+
],
|
|
3792
|
+
"indexes": [
|
|
3793
|
+
{
|
|
3794
|
+
"name": "idx_artifact_standard_source_mappings_standard",
|
|
3795
|
+
"def": "CREATE INDEX idx_artifact_standard_source_mappings_standard\n ON artifact_standard_source_mappings (artifact_standard_id)",
|
|
3796
|
+
"table": "artifact_standard_source_mappings",
|
|
3797
|
+
"columns": [
|
|
3798
|
+
"artifact_standard_id"
|
|
3799
|
+
]
|
|
3800
|
+
},
|
|
3801
|
+
{
|
|
3802
|
+
"name": "sqlite_autoindex_artifact_standard_source_mappings_1",
|
|
3803
|
+
"def": "PRIMARY KEY (source_mapping_id)",
|
|
3804
|
+
"table": "artifact_standard_source_mappings",
|
|
3805
|
+
"columns": [
|
|
3806
|
+
"source_mapping_id"
|
|
3807
|
+
]
|
|
3808
|
+
}
|
|
3809
|
+
],
|
|
3810
|
+
"constraints": [
|
|
3811
|
+
{
|
|
3812
|
+
"name": "source_mapping_id",
|
|
3813
|
+
"type": "PRIMARY KEY",
|
|
3814
|
+
"def": "PRIMARY KEY (source_mapping_id)",
|
|
3815
|
+
"table": "artifact_standard_source_mappings",
|
|
3816
|
+
"columns": [
|
|
3817
|
+
"source_mapping_id"
|
|
3818
|
+
]
|
|
3819
|
+
},
|
|
3820
|
+
{
|
|
3821
|
+
"name": "- (Foreign key ID: 0)",
|
|
3822
|
+
"type": "FOREIGN KEY",
|
|
3823
|
+
"def": "FOREIGN KEY (artifact_standard_id) REFERENCES artifact_standard_standards (artifact_standard_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE",
|
|
3824
|
+
"table": "artifact_standard_source_mappings",
|
|
3825
|
+
"referenced_table": "artifact_standard_standards",
|
|
3826
|
+
"columns": [
|
|
3827
|
+
"artifact_standard_id"
|
|
3828
|
+
],
|
|
3829
|
+
"referenced_columns": [
|
|
3830
|
+
"artifact_standard_id"
|
|
3831
|
+
]
|
|
3832
|
+
},
|
|
3833
|
+
{
|
|
3834
|
+
"name": "sqlite_autoindex_artifact_standard_source_mappings_1",
|
|
3835
|
+
"type": "PRIMARY KEY",
|
|
3836
|
+
"def": "PRIMARY KEY (source_mapping_id)",
|
|
3837
|
+
"table": "artifact_standard_source_mappings",
|
|
3838
|
+
"columns": [
|
|
3839
|
+
"source_mapping_id"
|
|
3840
|
+
]
|
|
3841
|
+
},
|
|
3842
|
+
{
|
|
3843
|
+
"name": "-",
|
|
3844
|
+
"type": "CHECK",
|
|
3845
|
+
"def": "CHECK (length(source_mapping_id) = 36)",
|
|
3846
|
+
"table": "artifact_standard_source_mappings",
|
|
3847
|
+
"columns": [
|
|
3848
|
+
"source_mapping_id"
|
|
3849
|
+
]
|
|
3850
|
+
},
|
|
3851
|
+
{
|
|
3852
|
+
"name": "-",
|
|
3853
|
+
"type": "CHECK",
|
|
3854
|
+
"def": "CHECK (length(artifact_standard_id) = 36)",
|
|
3855
|
+
"table": "artifact_standard_source_mappings",
|
|
3856
|
+
"columns": [
|
|
3857
|
+
"artifact_standard_id"
|
|
3858
|
+
]
|
|
3859
|
+
},
|
|
3860
|
+
{
|
|
3861
|
+
"name": "-",
|
|
3862
|
+
"type": "CHECK",
|
|
3863
|
+
"def": "CHECK (metadata_json IS NULL OR json_valid(metadata_json))",
|
|
3864
|
+
"table": "artifact_standard_source_mappings",
|
|
3865
|
+
"columns": [
|
|
3866
|
+
"metadata_json"
|
|
3867
|
+
]
|
|
3868
|
+
}
|
|
3869
|
+
],
|
|
3870
|
+
"def": "CREATE TABLE artifact_standard_source_mappings (\n -- source mapping 식별자\n source_mapping_id CHAR(36) PRIMARY KEY\n CHECK (length(source_mapping_id) = 36),\n\n -- 소속 산출물 표준 식별자\n artifact_standard_id CHAR(36) NOT NULL\n CHECK (length(artifact_standard_id) = 36),\n\n -- source type 코드\n source_type_code VARCHAR(64) NOT NULL,\n\n -- source URI 또는 경로\n source_uri VARCHAR(1024) NOT NULL,\n\n -- source label\n source_label VARCHAR(256),\n\n -- source section\n source_section VARCHAR(512),\n\n -- source fragment\n source_fragment TEXT,\n\n -- target type 코드\n target_type_code VARCHAR(128) NOT NULL,\n\n -- target 참조\n target_ref VARCHAR(256) NOT NULL,\n\n -- mapping type 코드\n mapping_type_code VARCHAR(64) NOT NULL,\n\n -- mapping status 코드\n mapping_status_code VARCHAR(64) NOT NULL DEFAULT 'CANDIDATE',\n\n -- 판단 근거\n rationale TEXT,\n\n -- 손실/보완 사항\n loss_note TEXT,\n\n -- 후속 조치 메모\n follow_up_note TEXT,\n\n -- 생성 시각\n created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 수정 시각\n updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\n -- 확장 메타데이터\n metadata_json JSON\n CHECK (metadata_json IS NULL OR json_valid(metadata_json)),\n\n FOREIGN KEY (artifact_standard_id)\n REFERENCES artifact_standard_standards (artifact_standard_id)\n ON DELETE CASCADE\n)"
|
|
3871
|
+
}
|
|
3872
|
+
],
|
|
3873
|
+
"relations": [
|
|
3874
|
+
{
|
|
3875
|
+
"table": "artifact_standard_codes",
|
|
3876
|
+
"columns": [
|
|
3877
|
+
"code_group_code"
|
|
3878
|
+
],
|
|
3879
|
+
"cardinality": "zero_or_one",
|
|
3880
|
+
"parent_table": "artifact_standard_code_groups",
|
|
3881
|
+
"parent_columns": [
|
|
3882
|
+
"code_group_code"
|
|
3883
|
+
],
|
|
3884
|
+
"parent_cardinality": "exactly_one",
|
|
3885
|
+
"def": "FOREIGN KEY (code_group_code) REFERENCES artifact_standard_code_groups (code_group_code) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
|
3886
|
+
},
|
|
3887
|
+
{
|
|
3888
|
+
"table": "artifact_standard_components",
|
|
3889
|
+
"columns": [
|
|
3890
|
+
"artifact_standard_id"
|
|
3891
|
+
],
|
|
3892
|
+
"cardinality": "zero_or_more",
|
|
3893
|
+
"parent_table": "artifact_standard_standards",
|
|
3894
|
+
"parent_columns": [
|
|
3895
|
+
"artifact_standard_id"
|
|
3896
|
+
],
|
|
3897
|
+
"parent_cardinality": "exactly_one",
|
|
3898
|
+
"def": "FOREIGN KEY (artifact_standard_id) REFERENCES artifact_standard_standards (artifact_standard_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
|
3899
|
+
},
|
|
3900
|
+
{
|
|
3901
|
+
"table": "artifact_standard_component_bindings",
|
|
3902
|
+
"columns": [
|
|
3903
|
+
"component_id"
|
|
3904
|
+
],
|
|
3905
|
+
"cardinality": "zero_or_more",
|
|
3906
|
+
"parent_table": "artifact_standard_components",
|
|
3907
|
+
"parent_columns": [
|
|
3908
|
+
"component_id"
|
|
3909
|
+
],
|
|
3910
|
+
"parent_cardinality": "exactly_one",
|
|
3911
|
+
"def": "FOREIGN KEY (component_id) REFERENCES artifact_standard_components (component_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
|
3912
|
+
},
|
|
3913
|
+
{
|
|
3914
|
+
"table": "artifact_standard_component_bindings",
|
|
3915
|
+
"columns": [
|
|
3916
|
+
"artifact_standard_id"
|
|
3917
|
+
],
|
|
3918
|
+
"cardinality": "zero_or_more",
|
|
3919
|
+
"parent_table": "artifact_standard_standards",
|
|
3920
|
+
"parent_columns": [
|
|
3921
|
+
"artifact_standard_id"
|
|
3922
|
+
],
|
|
3923
|
+
"parent_cardinality": "exactly_one",
|
|
3924
|
+
"def": "FOREIGN KEY (artifact_standard_id) REFERENCES artifact_standard_standards (artifact_standard_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
|
3925
|
+
},
|
|
3926
|
+
{
|
|
3927
|
+
"table": "artifact_standard_document_blueprints",
|
|
3928
|
+
"columns": [
|
|
3929
|
+
"artifact_standard_id"
|
|
3930
|
+
],
|
|
3931
|
+
"cardinality": "zero_or_more",
|
|
3932
|
+
"parent_table": "artifact_standard_standards",
|
|
3933
|
+
"parent_columns": [
|
|
3934
|
+
"artifact_standard_id"
|
|
3935
|
+
],
|
|
3936
|
+
"parent_cardinality": "exactly_one",
|
|
3937
|
+
"def": "FOREIGN KEY (artifact_standard_id) REFERENCES artifact_standard_standards (artifact_standard_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
|
3938
|
+
},
|
|
3939
|
+
{
|
|
3940
|
+
"table": "artifact_standard_blueprint_nodes",
|
|
3941
|
+
"columns": [
|
|
3942
|
+
"parent_blueprint_node_id"
|
|
3943
|
+
],
|
|
3944
|
+
"cardinality": "zero_or_more",
|
|
3945
|
+
"parent_table": "artifact_standard_blueprint_nodes",
|
|
3946
|
+
"parent_columns": [
|
|
3947
|
+
"blueprint_node_id"
|
|
3948
|
+
],
|
|
3949
|
+
"parent_cardinality": "zero_or_one",
|
|
3950
|
+
"def": "FOREIGN KEY (parent_blueprint_node_id) REFERENCES artifact_standard_blueprint_nodes (blueprint_node_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
|
3951
|
+
},
|
|
3952
|
+
{
|
|
3953
|
+
"table": "artifact_standard_blueprint_nodes",
|
|
3954
|
+
"columns": [
|
|
3955
|
+
"blueprint_id"
|
|
3956
|
+
],
|
|
3957
|
+
"cardinality": "zero_or_more",
|
|
3958
|
+
"parent_table": "artifact_standard_document_blueprints",
|
|
3959
|
+
"parent_columns": [
|
|
3960
|
+
"blueprint_id"
|
|
3961
|
+
],
|
|
3962
|
+
"parent_cardinality": "exactly_one",
|
|
3963
|
+
"def": "FOREIGN KEY (blueprint_id) REFERENCES artifact_standard_document_blueprints (blueprint_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
|
3964
|
+
},
|
|
3965
|
+
{
|
|
3966
|
+
"table": "artifact_standard_template_slots",
|
|
3967
|
+
"columns": [
|
|
3968
|
+
"parent_template_slot_id"
|
|
3969
|
+
],
|
|
3970
|
+
"cardinality": "zero_or_more",
|
|
3971
|
+
"parent_table": "artifact_standard_template_slots",
|
|
3972
|
+
"parent_columns": [
|
|
3973
|
+
"template_slot_id"
|
|
3974
|
+
],
|
|
3975
|
+
"parent_cardinality": "zero_or_one",
|
|
3976
|
+
"def": "FOREIGN KEY (parent_template_slot_id) REFERENCES artifact_standard_template_slots (template_slot_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
|
3977
|
+
},
|
|
3978
|
+
{
|
|
3979
|
+
"table": "artifact_standard_template_slots",
|
|
3980
|
+
"columns": [
|
|
3981
|
+
"blueprint_node_id"
|
|
3982
|
+
],
|
|
3983
|
+
"cardinality": "zero_or_more",
|
|
3984
|
+
"parent_table": "artifact_standard_blueprint_nodes",
|
|
3985
|
+
"parent_columns": [
|
|
3986
|
+
"blueprint_node_id"
|
|
3987
|
+
],
|
|
3988
|
+
"parent_cardinality": "zero_or_one",
|
|
3989
|
+
"def": "FOREIGN KEY (blueprint_node_id) REFERENCES artifact_standard_blueprint_nodes (blueprint_node_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
|
3990
|
+
},
|
|
3991
|
+
{
|
|
3992
|
+
"table": "artifact_standard_template_slots",
|
|
3993
|
+
"columns": [
|
|
3994
|
+
"blueprint_id"
|
|
3995
|
+
],
|
|
3996
|
+
"cardinality": "zero_or_more",
|
|
3997
|
+
"parent_table": "artifact_standard_document_blueprints",
|
|
3998
|
+
"parent_columns": [
|
|
3999
|
+
"blueprint_id"
|
|
4000
|
+
],
|
|
4001
|
+
"parent_cardinality": "exactly_one",
|
|
4002
|
+
"def": "FOREIGN KEY (blueprint_id) REFERENCES artifact_standard_document_blueprints (blueprint_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
|
4003
|
+
},
|
|
4004
|
+
{
|
|
4005
|
+
"table": "artifact_standard_document_components",
|
|
4006
|
+
"columns": [
|
|
4007
|
+
"parent_document_component_id"
|
|
4008
|
+
],
|
|
4009
|
+
"cardinality": "zero_or_more",
|
|
4010
|
+
"parent_table": "artifact_standard_document_components",
|
|
4011
|
+
"parent_columns": [
|
|
4012
|
+
"document_component_id"
|
|
4013
|
+
],
|
|
4014
|
+
"parent_cardinality": "zero_or_one",
|
|
4015
|
+
"def": "FOREIGN KEY (parent_document_component_id) REFERENCES artifact_standard_document_components (document_component_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
|
4016
|
+
},
|
|
4017
|
+
{
|
|
4018
|
+
"table": "artifact_standard_document_components",
|
|
4019
|
+
"columns": [
|
|
4020
|
+
"blueprint_id"
|
|
4021
|
+
],
|
|
4022
|
+
"cardinality": "zero_or_more",
|
|
4023
|
+
"parent_table": "artifact_standard_document_blueprints",
|
|
4024
|
+
"parent_columns": [
|
|
4025
|
+
"blueprint_id"
|
|
4026
|
+
],
|
|
4027
|
+
"parent_cardinality": "zero_or_one",
|
|
4028
|
+
"def": "FOREIGN KEY (blueprint_id) REFERENCES artifact_standard_document_blueprints (blueprint_id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
|
4029
|
+
},
|
|
4030
|
+
{
|
|
4031
|
+
"table": "artifact_standard_document_components",
|
|
4032
|
+
"columns": [
|
|
4033
|
+
"artifact_standard_id"
|
|
4034
|
+
],
|
|
4035
|
+
"cardinality": "zero_or_more",
|
|
4036
|
+
"parent_table": "artifact_standard_standards",
|
|
4037
|
+
"parent_columns": [
|
|
4038
|
+
"artifact_standard_id"
|
|
4039
|
+
],
|
|
4040
|
+
"parent_cardinality": "exactly_one",
|
|
4041
|
+
"def": "FOREIGN KEY (artifact_standard_id) REFERENCES artifact_standard_standards (artifact_standard_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
|
4042
|
+
},
|
|
4043
|
+
{
|
|
4044
|
+
"table": "artifact_standard_document_component_relations",
|
|
4045
|
+
"columns": [
|
|
4046
|
+
"target_document_component_id"
|
|
4047
|
+
],
|
|
4048
|
+
"cardinality": "zero_or_more",
|
|
4049
|
+
"parent_table": "artifact_standard_document_components",
|
|
4050
|
+
"parent_columns": [
|
|
4051
|
+
"document_component_id"
|
|
4052
|
+
],
|
|
4053
|
+
"parent_cardinality": "exactly_one",
|
|
4054
|
+
"def": "FOREIGN KEY (target_document_component_id) REFERENCES artifact_standard_document_components (document_component_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
|
4055
|
+
},
|
|
4056
|
+
{
|
|
4057
|
+
"table": "artifact_standard_document_component_relations",
|
|
4058
|
+
"columns": [
|
|
4059
|
+
"source_document_component_id"
|
|
4060
|
+
],
|
|
4061
|
+
"cardinality": "zero_or_more",
|
|
4062
|
+
"parent_table": "artifact_standard_document_components",
|
|
4063
|
+
"parent_columns": [
|
|
4064
|
+
"document_component_id"
|
|
4065
|
+
],
|
|
4066
|
+
"parent_cardinality": "exactly_one",
|
|
4067
|
+
"def": "FOREIGN KEY (source_document_component_id) REFERENCES artifact_standard_document_components (document_component_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
|
4068
|
+
},
|
|
4069
|
+
{
|
|
4070
|
+
"table": "artifact_standard_document_component_relations",
|
|
4071
|
+
"columns": [
|
|
4072
|
+
"artifact_standard_id"
|
|
4073
|
+
],
|
|
4074
|
+
"cardinality": "zero_or_more",
|
|
4075
|
+
"parent_table": "artifact_standard_standards",
|
|
4076
|
+
"parent_columns": [
|
|
4077
|
+
"artifact_standard_id"
|
|
4078
|
+
],
|
|
4079
|
+
"parent_cardinality": "exactly_one",
|
|
4080
|
+
"def": "FOREIGN KEY (artifact_standard_id) REFERENCES artifact_standard_standards (artifact_standard_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
|
4081
|
+
},
|
|
4082
|
+
{
|
|
4083
|
+
"table": "artifact_standard_physical_structure_policies",
|
|
4084
|
+
"columns": [
|
|
4085
|
+
"document_component_id"
|
|
4086
|
+
],
|
|
4087
|
+
"cardinality": "zero_or_more",
|
|
4088
|
+
"parent_table": "artifact_standard_document_components",
|
|
4089
|
+
"parent_columns": [
|
|
4090
|
+
"document_component_id"
|
|
4091
|
+
],
|
|
4092
|
+
"parent_cardinality": "zero_or_one",
|
|
4093
|
+
"def": "FOREIGN KEY (document_component_id) REFERENCES artifact_standard_document_components (document_component_id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
|
4094
|
+
},
|
|
4095
|
+
{
|
|
4096
|
+
"table": "artifact_standard_physical_structure_policies",
|
|
4097
|
+
"columns": [
|
|
4098
|
+
"artifact_standard_id"
|
|
4099
|
+
],
|
|
4100
|
+
"cardinality": "zero_or_more",
|
|
4101
|
+
"parent_table": "artifact_standard_standards",
|
|
4102
|
+
"parent_columns": [
|
|
4103
|
+
"artifact_standard_id"
|
|
4104
|
+
],
|
|
4105
|
+
"parent_cardinality": "exactly_one",
|
|
4106
|
+
"def": "FOREIGN KEY (artifact_standard_id) REFERENCES artifact_standard_standards (artifact_standard_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
|
4107
|
+
},
|
|
4108
|
+
{
|
|
4109
|
+
"table": "artifact_standard_table_schemas",
|
|
4110
|
+
"columns": [
|
|
4111
|
+
"artifact_standard_id"
|
|
4112
|
+
],
|
|
4113
|
+
"cardinality": "zero_or_more",
|
|
4114
|
+
"parent_table": "artifact_standard_standards",
|
|
4115
|
+
"parent_columns": [
|
|
4116
|
+
"artifact_standard_id"
|
|
4117
|
+
],
|
|
4118
|
+
"parent_cardinality": "exactly_one",
|
|
4119
|
+
"def": "FOREIGN KEY (artifact_standard_id) REFERENCES artifact_standard_standards (artifact_standard_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
|
4120
|
+
},
|
|
4121
|
+
{
|
|
4122
|
+
"table": "artifact_standard_table_column_schemas",
|
|
4123
|
+
"columns": [
|
|
4124
|
+
"table_schema_id"
|
|
4125
|
+
],
|
|
4126
|
+
"cardinality": "zero_or_more",
|
|
4127
|
+
"parent_table": "artifact_standard_table_schemas",
|
|
4128
|
+
"parent_columns": [
|
|
4129
|
+
"table_schema_id"
|
|
4130
|
+
],
|
|
4131
|
+
"parent_cardinality": "exactly_one",
|
|
4132
|
+
"def": "FOREIGN KEY (table_schema_id) REFERENCES artifact_standard_table_schemas (table_schema_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
|
4133
|
+
},
|
|
4134
|
+
{
|
|
4135
|
+
"table": "artifact_standard_figure_policies",
|
|
4136
|
+
"columns": [
|
|
4137
|
+
"artifact_standard_id"
|
|
4138
|
+
],
|
|
4139
|
+
"cardinality": "zero_or_more",
|
|
4140
|
+
"parent_table": "artifact_standard_standards",
|
|
4141
|
+
"parent_columns": [
|
|
4142
|
+
"artifact_standard_id"
|
|
4143
|
+
],
|
|
4144
|
+
"parent_cardinality": "exactly_one",
|
|
4145
|
+
"def": "FOREIGN KEY (artifact_standard_id) REFERENCES artifact_standard_standards (artifact_standard_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
|
4146
|
+
},
|
|
4147
|
+
{
|
|
4148
|
+
"table": "artifact_standard_diagram_policies",
|
|
4149
|
+
"columns": [
|
|
4150
|
+
"artifact_standard_id"
|
|
4151
|
+
],
|
|
4152
|
+
"cardinality": "zero_or_more",
|
|
4153
|
+
"parent_table": "artifact_standard_standards",
|
|
4154
|
+
"parent_columns": [
|
|
4155
|
+
"artifact_standard_id"
|
|
4156
|
+
],
|
|
4157
|
+
"parent_cardinality": "exactly_one",
|
|
4158
|
+
"def": "FOREIGN KEY (artifact_standard_id) REFERENCES artifact_standard_standards (artifact_standard_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
|
4159
|
+
},
|
|
4160
|
+
{
|
|
4161
|
+
"table": "artifact_standard_validation_rule_sets",
|
|
4162
|
+
"columns": [
|
|
4163
|
+
"artifact_standard_id"
|
|
4164
|
+
],
|
|
4165
|
+
"cardinality": "zero_or_more",
|
|
4166
|
+
"parent_table": "artifact_standard_standards",
|
|
4167
|
+
"parent_columns": [
|
|
4168
|
+
"artifact_standard_id"
|
|
4169
|
+
],
|
|
4170
|
+
"parent_cardinality": "exactly_one",
|
|
4171
|
+
"def": "FOREIGN KEY (artifact_standard_id) REFERENCES artifact_standard_standards (artifact_standard_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
|
4172
|
+
},
|
|
4173
|
+
{
|
|
4174
|
+
"table": "artifact_standard_validation_rule_set_rules",
|
|
4175
|
+
"columns": [
|
|
4176
|
+
"validation_rule_set_id"
|
|
4177
|
+
],
|
|
4178
|
+
"cardinality": "zero_or_more",
|
|
4179
|
+
"parent_table": "artifact_standard_validation_rule_sets",
|
|
4180
|
+
"parent_columns": [
|
|
4181
|
+
"validation_rule_set_id"
|
|
4182
|
+
],
|
|
4183
|
+
"parent_cardinality": "exactly_one",
|
|
4184
|
+
"def": "FOREIGN KEY (validation_rule_set_id) REFERENCES artifact_standard_validation_rule_sets (validation_rule_set_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
|
4185
|
+
},
|
|
4186
|
+
{
|
|
4187
|
+
"table": "artifact_standard_generated_output_links",
|
|
4188
|
+
"columns": [
|
|
4189
|
+
"target_artifact_standard_id"
|
|
4190
|
+
],
|
|
4191
|
+
"cardinality": "zero_or_more",
|
|
4192
|
+
"parent_table": "artifact_standard_standards",
|
|
4193
|
+
"parent_columns": [
|
|
4194
|
+
"artifact_standard_id"
|
|
4195
|
+
],
|
|
4196
|
+
"parent_cardinality": "zero_or_one",
|
|
4197
|
+
"def": "FOREIGN KEY (target_artifact_standard_id) REFERENCES artifact_standard_standards (artifact_standard_id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
|
|
4198
|
+
},
|
|
4199
|
+
{
|
|
4200
|
+
"table": "artifact_standard_generated_output_links",
|
|
4201
|
+
"columns": [
|
|
4202
|
+
"source_artifact_standard_id"
|
|
4203
|
+
],
|
|
4204
|
+
"cardinality": "zero_or_more",
|
|
4205
|
+
"parent_table": "artifact_standard_standards",
|
|
4206
|
+
"parent_columns": [
|
|
4207
|
+
"artifact_standard_id"
|
|
4208
|
+
],
|
|
4209
|
+
"parent_cardinality": "exactly_one",
|
|
4210
|
+
"def": "FOREIGN KEY (source_artifact_standard_id) REFERENCES artifact_standard_standards (artifact_standard_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
|
4211
|
+
},
|
|
4212
|
+
{
|
|
4213
|
+
"table": "artifact_standard_source_mappings",
|
|
4214
|
+
"columns": [
|
|
4215
|
+
"artifact_standard_id"
|
|
4216
|
+
],
|
|
4217
|
+
"cardinality": "zero_or_more",
|
|
4218
|
+
"parent_table": "artifact_standard_standards",
|
|
4219
|
+
"parent_columns": [
|
|
4220
|
+
"artifact_standard_id"
|
|
4221
|
+
],
|
|
4222
|
+
"parent_cardinality": "exactly_one",
|
|
4223
|
+
"def": "FOREIGN KEY (artifact_standard_id) REFERENCES artifact_standard_standards (artifact_standard_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
|
|
4224
|
+
}
|
|
4225
|
+
],
|
|
4226
|
+
"driver": {
|
|
4227
|
+
"name": "sqlite",
|
|
4228
|
+
"database_version": "3.51.3"
|
|
4229
|
+
}
|
|
4230
|
+
}
|