-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpatterns.sql
More file actions
104 lines (90 loc) · 2.51 KB
/
patterns.sql
File metadata and controls
104 lines (90 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
PRAGMA encoding = 'UTF-8';
PRAGMA page_size = 8192; -- blob optimisation https://www.sqlite.org/intern-v-extern-blob.html
PRAGMA foreign_keys = ON;
-- The VACUUM command may change the ROWIDs of entries in any tables that do not have an explicit INTEGER PRIMARY KEY
DROP TABLE IF EXISTS patterns;
DROP TABLE IF EXISTS lines;
DROP TABLE IF EXISTS plays;
DROP TABLE IF EXISTS verse;
DROP TABLE IF EXISTS prose;
CREATE TABLE patterns (
-- une pièce
id INTEGER, -- rowid auto
play TEXT, -- play id
author TEXT, -- auteur lisible
title TEXT, -- titre lisible
genre TEXT, -- nom de genre
created INTEGER, -- année de création
line_n TEXT, --
act_n INTEGER,
scene_n INTEGER,
line_id TEXT,
line TEXT,
position INTEGER,
graph TEXT, --
cat TEXT,
graph_full TEXT,
cat_full TEXT,
graph_ref TEXT,
PRIMARY KEY(id ASC)
);
CREATE UNIQUE INDEX patterns_id ON patterns(id);
CREATE INDEX patterns_author ON patterns(author);
CREATE INDEX patterns_play ON patterns(play);
CREATE INDEX patterns_graph ON patterns(graph);
CREATE INDEX patterns_cat ON patterns(cat);
CREATE TABLE lines (
-- une pièce
id INTEGER, -- rowid auto
play TEXT, -- play id
author TEXT, -- auteur lisible
title TEXT, -- titre lisible
genre TEXT, -- nom de genre
created INTEGER, -- année de création
line_n TEXT, --
act_n INTEGER,
scene_n INTEGER,
line_id TEXT,
graph TEXT, --
cat TEXT,
graph_full TEXT,
cat_full TEXT,
graph_ref TEXT,
PRIMARY KEY(id ASC)
);
CREATE UNIQUE INDEX lines_id ON lines(id);
CREATE INDEX lines_author ON lines(author);
CREATE INDEX lines_play ON lines(play);
CREATE INDEX lines_graph ON lines(graph);
CREATE INDEX lines_cat ON lines(cat);
CREATE TABLE plays (
id INTEGER,
play INTEGER,
l INTEGER,
author TEXT, -- auteur lisible
title TEXT, -- titre lisible
genre TEXT, -- nom de genre
created INTEGER, -- année de création
prose TEXT, -- verse/prose
PRIMARY KEY(id ASC)
);
CREATE TABLE verse (
id INTEGER, -- rowid auto
play TEXT, -- play id
graph TEXT, --
cat TEXT,
graph_full TEXT,
cat_full TEXT,
l INTEGER,
PRIMARY KEY(id ASC)
);
CREATE TABLE prose (
id INTEGER, -- rowid auto
play TEXT, -- play id
graph TEXT, --
cat TEXT,
graph_full TEXT,
cat_full TEXT,
l INTEGER,
PRIMARY KEY(id ASC)
);