forked from stffn/declarative_authorization
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.sql
55 lines (48 loc) · 1.17 KB
/
schema.sql
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
CREATE TABLE 'test_models' (
'id' INTEGER PRIMARY KEY NOT NULL,
'test_attr_through_id' INTEGER,
'content' text,
'country_id' integer,
'created_at' datetime,
'updated_at' datetime
);
CREATE TABLE 'test_attrs' (
'id' INTEGER PRIMARY KEY NOT NULL,
'test_model_id' integer,
'test_another_model_id' integer,
'test_a_third_model_id' integer,
'branch_id' integer,
'company_id' integer,
'test_attr_through_id' INTEGER,
'n_way_join_item_id' INTEGER,
'test_model_security_model_id' integer,
'attr' integer default 1
);
CREATE TABLE 'test_attr_throughs' (
'id' INTEGER PRIMARY KEY NOT NULL,
'test_attr_id' integer
);
CREATE TABLE 'test_model_security_models' (
'id' INTEGER PRIMARY KEY NOT NULL,
'attr' integer default 1,
'attr_2' integer default 1,
'test_attr_id' integer
);
CREATE TABLE 'n_way_join_items' (
'id' INTEGER PRIMARY KEY NOT NULL
);
CREATE TABLE 'branches' (
'id' INTEGER PRIMARY KEY NOT NULL,
'company_id' integer,
'name' text
);
CREATE TABLE 'companies' (
'id' INTEGER PRIMARY KEY NOT NULL,
'country_id' integer,
'type' text,
'name' text
);
CREATE TABLE 'countries' (
'id' INTEGER PRIMARY KEY NOT NULL,
'name' text
);