This repository has been archived by the owner on Nov 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
schema.xml
120 lines (100 loc) · 5.84 KB
/
schema.xml
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<?xml version="1.0" encoding="utf-8"?>
<database name="default" defaultIdMethod="native" defaultPhpNamingMethod="underscore" namespace="MangaSekai\Database">
<table name="chapter_tracker" idMethod="native" phpName="ChapterTracker">
<column name="id_chapter" phpName="IdChapter" type="INTEGER" size="10" primaryKey="true" required="true"/>
<column name="id_user" phpName="IdUser" type="INTEGER" size="10" primaryKey="true" required="true"/>
<column name="page" phpName="Page" type="INTEGER" size="10" required="true"/>
<foreign-key foreignTable="chapters" name="fk_chapter_tracker" onDelete="CASCADE" onUpdate="CASCADE">
<reference local="id_chapter" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="users" name="fk_users_tracker" onDelete="CASCADE" onUpdate="CASCADE">
<reference local="id_user" foreign="id"/>
</foreign-key>
<index name="fk_users_tracker">
<index-column name="id_user"/>
</index>
</table>
<table name="chapters" idMethod="native" phpName="Chapters">
<column name="id" phpName="Id" type="INTEGER" size="10" primaryKey="true" autoIncrement="true" required="true"/>
<column name="id_series" phpName="IdSeries" type="INTEGER" size="10" required="true"/>
<column name="pages_count" phpName="PagesCount" type="INTEGER" required="true"/>
<column name="number" phpName="Number" type="REAL" required="true"/>
<foreign-key foreignTable="series" name="fk_series" onDelete="CASCADE" onUpdate="CASCADE">
<reference local="id_series" foreign="id"/>
</foreign-key>
<unique name="idx_chapter_series">
<unique-column name="id_series"/>
<unique-column name="number"/>
</unique>
</table>
<table name="genres" idMethod="native" phpName="Genres">
<column name="id" phpName="Id" type="INTEGER" size="10" primaryKey="true" autoIncrement="true" required="true"/>
<column name="name" phpName="Name" type="LONGVARCHAR" required="true"/>
<unique name="idx_genre_name">
<unique-column name="name"/>
</unique>
</table>
<table name="series_genres" idMethod="native" phpName="SeriesGenres">
<column name="id_series" primaryKey="true" phpName="IdSerie" type="INTEGER" required="true"/>
<column name="id_genre" primaryKey="true" phpName="IdGenre" type="INTEGER" required="true"/>
<foreign-key foreignTable="series" name="fk_series_genres" onDelete="CASCADE" onUpdate="CASCADE">
<reference local="id_series" foreign="id" />
</foreign-key>
</table>
<table name="series" idMethod="native" phpName="Series">
<column name="id" phpName="Id" type="INTEGER" size="10" primaryKey="true" autoIncrement="true" required="true"/>
<column name="name" phpName="Name" type="VARCHAR" size="255" required="true"/>
<column name="chapter_count" phpName="ChapterCount" type="INTEGER" required="true"/>
<column name="pages_count" phpName="PagesCount" type="INTEGER" required="true"/>
<column name="description" phpName="Description" type="LONGVARCHAR" required="true"/>
<column name="synced" phpName="Synced" type="INTEGER" size="1" required="true" default="0"/>
<column name="image" phpName="Image" type="LONGVARCHAR"/>
<column name="path" phpName="Path" type="LONGVARCHAR" required="true" defaultValue=""/>
</table>
<table name="series_tracker" idMethod="native" phpName="SeriesTracker">
<column name="id_user" phpName="IdUser" type="INTEGER" size="10" primaryKey="true" required="true"/>
<column name="id_series" phpName="IdSeries" type="INTEGER" size="10" primaryKey="true" required="true"/>
<foreign-key foreignTable="series" name="fk_series_tracker" onDelete="CASCADE" onUpdate="CASCADE">
<reference local="id_series" foreign="id"/>
</foreign-key>
<foreign-key foreignTable="users" name="fk_user_tracker" onDelete="CASCADE" onUpdate="CASCADE">
<reference local="id_user" foreign="id"/>
</foreign-key>
<index name="fk_series_tracker">
<index-column name="id_series"/>
</index>
</table>
<table name="users" idMethod="native" phpName="Users">
<column name="id" phpName="Id" type="INTEGER" size="10" primaryKey="true" autoIncrement="true" required="true"/>
<column name="username" phpName="Username" type="LONGVARCHAR" required="true"/>
<column name="password" phpName="Password" type="CHAR" size="64" required="true"/>
</table>
<table name="settings" idMethod="native" phpName="Settings">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true"/>
<column name="name" phpName="Name" type="LONGVARCHAR" required="true"/>
<column name="value" phpName="Value" type="LONGVARCHAR"/>
<unique name="settings_u_d94269">
<unique-column name="name"/>
</unique>
</table>
<table name="pages" idMethod="native" phpName="Pages">
<column name="id_chapter" phpName="IdChapter" type="INTEGER" primaryKey="true" required="true"/>
<column name="page" phpName="Page" type="INTEGER" primaryKey="true" required="true"/>
<column name="path" phpName="Path" type="LONGVARCHAR"/>
<unique name="pages_u_ddcfb5">
<unique-column name="page"/>
<unique-column name="id_chapter"/>
</unique>
</table>
<table name="staff" idMethod="native" phpName="Staff">
<column name="id" phpName="Id" type="INTEGER" primaryKey="true" autoIncrement="true"/>
<column name="name" phpName="Name" type="LONGVARCHAR" required="true"/>
<column name="image" phpName="Image" type="LONGVARCHAR"/>
<column name="description" phpName="Description" type="LONGVARCHAR" required="true" defaultValue="" />
</table>
<table name="series_staff" idMethod="native" phpName="SeriesStaff">
<column name="id_serie" primaryKey="true" phpName="IdSerie" type="INTEGER" required="true"/>
<column name="id_staff" primaryKey="true" phpName="IdStaff" type="INTEGER" required="true"/>
<column name="role" phpName="Role" type="LONGVARCHAR"/>
</table>
</database>