-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema_v1.sql
45 lines (45 loc) · 7.08 KB
/
schema_v1.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
CREATE TABLE "django_migrations" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "app" varchar(255) NOT NULL, "name" varchar(255) NOT NULL, "applied" datetime NOT NULL);
CREATE TABLE "django_content_type" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "name" varchar(100) NOT NULL, "app_label" varchar(100) NOT NULL, "model" varchar(100) NOT NULL, UNIQUE ("app_label", "model"));
CREATE TABLE "auth_permission" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "name" varchar(50) NOT NULL, "content_type_id" integer NOT NULL REFERENCES "django_content_type" ("id"), "codename" varchar(100) NOT NULL, UNIQUE ("content_type_id", "codename"));
CREATE TABLE "auth_group" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "name" varchar(80) NOT NULL UNIQUE);
CREATE TABLE "auth_group_permissions" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "group_id" integer NOT NULL REFERENCES "auth_group" ("id"), "permission_id" integer NOT NULL REFERENCES "auth_permission" ("id"), UNIQUE ("group_id", "permission_id"));
CREATE TABLE "auth_user" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "password" varchar(128) NOT NULL, "last_login" datetime NOT NULL, "is_superuser" bool NOT NULL, "username" varchar(30) NOT NULL UNIQUE, "first_name" varchar(30) NOT NULL, "last_name" varchar(30) NOT NULL, "email" varchar(75) NOT NULL, "is_staff" bool NOT NULL, "is_active" bool NOT NULL, "date_joined" datetime NOT NULL);
CREATE TABLE "auth_user_groups" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "user_id" integer NOT NULL REFERENCES "auth_user" ("id"), "group_id" integer NOT NULL REFERENCES "auth_group" ("id"), UNIQUE ("user_id", "group_id"));
CREATE TABLE "auth_user_user_permissions" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "user_id" integer NOT NULL REFERENCES "auth_user" ("id"), "permission_id" integer NOT NULL REFERENCES "auth_permission" ("id"), UNIQUE ("user_id", "permission_id"));
CREATE INDEX auth_permission_417f1b1c ON "auth_permission" ("content_type_id");
CREATE INDEX auth_group_permissions_0e939a4f ON "auth_group_permissions" ("group_id");
CREATE INDEX auth_group_permissions_8373b171 ON "auth_group_permissions" ("permission_id");
CREATE INDEX auth_user_groups_e8701ad4 ON "auth_user_groups" ("user_id");
CREATE INDEX auth_user_groups_0e939a4f ON "auth_user_groups" ("group_id");
CREATE INDEX auth_user_user_permissions_e8701ad4 ON "auth_user_user_permissions" ("user_id");
CREATE INDEX auth_user_user_permissions_8373b171 ON "auth_user_user_permissions" ("permission_id");
CREATE TABLE "django_admin_log" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "action_time" datetime NOT NULL, "object_id" text NULL, "object_repr" varchar(200) NOT NULL, "action_flag" smallint unsigned NOT NULL, "change_message" text NOT NULL, "content_type_id" integer NULL REFERENCES "django_content_type" ("id"), "user_id" integer NOT NULL REFERENCES "auth_user" ("id"));
CREATE INDEX django_admin_log_417f1b1c ON "django_admin_log" ("content_type_id");
CREATE INDEX django_admin_log_e8701ad4 ON "django_admin_log" ("user_id");
CREATE TABLE "manager_account_users" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "account_id" integer NOT NULL REFERENCES "manager_account" ("id"), "user_id" integer NOT NULL REFERENCES "auth_user" ("id"), UNIQUE ("account_id", "user_id"));
CREATE INDEX manager_account_users_8a089c2a ON "manager_account_users" ("account_id");
CREATE INDEX manager_account_users_e8701ad4 ON "manager_account_users" ("user_id");
CREATE TABLE "manager_database" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "type" varchar(50) NOT NULL, "name" varchar(50) NOT NULL UNIQUE, "password" varchar(255) NOT NULL, "added_at" datetime NULL, "account_id" integer NOT NULL REFERENCES "manager_account" ("id"), "added_by_id" integer NOT NULL REFERENCES "auth_user" ("id"), "user" varchar(16) NOT NULL UNIQUE);
CREATE INDEX manager_database_8a089c2a ON "manager_database" ("account_id");
CREATE INDEX manager_database_0c5d7d4e ON "manager_database" ("added_by_id");
CREATE TABLE "manager_account" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "name" varchar(32) NOT NULL, "added_at" datetime NULL, "added_by_id" integer NOT NULL REFERENCES "auth_user" ("id"), "description" varchar(1000) NOT NULL);
CREATE INDEX manager_account_0c5d7d4e ON "manager_account" ("added_by_id");
CREATE TABLE "manager_usersshkey" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "name" varchar(255) NOT NULL, "added_at" datetime NULL, "added_by_id" integer NOT NULL REFERENCES "auth_user" ("id"), "user_id" integer NOT NULL REFERENCES "auth_user" ("id"), "ssh_key" text NOT NULL);
CREATE INDEX manager_usersshkey_0c5d7d4e ON "manager_usersshkey" ("added_by_id");
CREATE INDEX manager_usersshkey_e8701ad4 ON "manager_usersshkey" ("user_id");
CREATE TABLE "manager_appimagevariable" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "value" text NOT NULL, "app_id" integer NOT NULL REFERENCES "manager_app" ("id"), "name" varchar(255) NOT NULL);
CREATE INDEX manager_appimagevariable_f382adfe ON "manager_appimagevariable" ("app_id");
CREATE TABLE "manager_domain" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "name" varchar(255) NOT NULL, "redirect_url" varchar(255) NOT NULL, "nginx_config" text NOT NULL, "apache_config" text NOT NULL, "apache_enabled" bool NOT NULL, "added_at" datetime NULL, "account_id" integer NOT NULL REFERENCES "manager_account" ("id"), "added_by_id" integer NOT NULL REFERENCES "auth_user" ("id"), "ssl_enabled" bool NOT NULL);
CREATE INDEX manager_domain_8a089c2a ON "manager_domain" ("account_id");
CREATE INDEX manager_domain_0c5d7d4e ON "manager_domain" ("added_by_id");
CREATE TABLE "manager_imagevariable" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "name" varchar(255) NOT NULL, "description" text NOT NULL, "default" text NULL, "image_id" integer NOT NULL REFERENCES "manager_image" ("id"), "filename" varchar(255) NULL);
CREATE INDEX manager_imagevariable_f33175e6 ON "manager_imagevariable" ("image_id");
CREATE TABLE "manager_app" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "name" varchar(50) NOT NULL, "container_id" text NULL, "memory" integer NOT NULL, "added_at" datetime NULL, "account_id" integer NOT NULL REFERENCES "manager_account" ("id"), "added_by_id" integer NOT NULL REFERENCES "auth_user" ("id"), "image_id" integer NOT NULL REFERENCES "manager_image" ("id"), UNIQUE ("name", "account_id"));
CREATE INDEX manager_app_8a089c2a ON "manager_app" ("account_id");
CREATE INDEX manager_app_0c5d7d4e ON "manager_app" ("added_by_id");
CREATE INDEX manager_app_f33175e6 ON "manager_app" ("image_id");
CREATE TABLE "manager_image" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "name" text NOT NULL, "description" text NOT NULL, "added_at" datetime NULL, "type" varchar(255) NOT NULL);
CREATE TABLE "manager_imageport" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "port" integer NOT NULL, "image_id" integer NOT NULL REFERENCES "manager_image" ("id"), "type" varchar(255) NOT NULL);
CREATE INDEX manager_imageport_f33175e6 ON "manager_imageport" ("image_id");
CREATE TABLE "django_session" ("session_key" varchar(40) NOT NULL PRIMARY KEY, "session_data" text NOT NULL, "expire_date" datetime NOT NULL);
CREATE INDEX django_session_de54fa62 ON "django_session" ("expire_date");