summaryrefslogtreecommitdiff
path: root/sql/tables
diff options
context:
space:
mode:
authorckonstanski <carlos.konstanski@olo.com>2024-05-25 18:03:25 -0600
committerckonstanski <carlos.konstanski@olo.com>2024-05-25 18:03:25 -0600
commitb8423f4d05c75094b7b9d09c6f0bb353acc9be1c (patch)
tree3732f71f84191b26f038130c2220fb502d738251 /sql/tables
initial commit
Diffstat (limited to 'sql/tables')
-rw-r--r--sql/tables/auth.registrations.sql11
-rw-r--r--sql/tables/auth.role_groups.sql7
-rw-r--r--sql/tables/auth.role_groups_roles.sql7
-rw-r--r--sql/tables/auth.roles.sql7
-rw-r--r--sql/tables/auth.user_session_objects.sql8
-rw-r--r--sql/tables/auth.user_sessions.sql7
-rw-r--r--sql/tables/auth.users.sql13
-rw-r--r--sql/tables/auth.users_role_groups.sql7
-rw-r--r--sql/tables/auth.users_roles_append.sql7
-rw-r--r--sql/tables/auth.users_roles_exclude.sql7
-rw-r--r--sql/tables/contact.contact_us.sql6
-rw-r--r--sql/tables/contact.contact_us_posts.sql11
-rw-r--r--sql/tables/contact.contact_us_posts_read.sql7
-rw-r--r--sql/tables/general.about_us.sql6
-rw-r--r--sql/tables/general.testimonials.sql6
15 files changed, 117 insertions, 0 deletions
diff --git a/sql/tables/auth.registrations.sql b/sql/tables/auth.registrations.sql
new file mode 100644
index 0000000..91eb3a1
--- /dev/null
+++ b/sql/tables/auth.registrations.sql
@@ -0,0 +1,11 @@
+drop table auth.registrations cascade;
+
+create table auth.registrations (
+ id serial8 primary key,
+ hash bytea not null,
+ first_name character varying(255) not null,
+ last_name character varying(255) not null,
+ email character varying(255) not null,
+ role_groups text,
+ created timestamp without time zone not null default now()
+);
diff --git a/sql/tables/auth.role_groups.sql b/sql/tables/auth.role_groups.sql
new file mode 100644
index 0000000..8b6d225
--- /dev/null
+++ b/sql/tables/auth.role_groups.sql
@@ -0,0 +1,7 @@
+drop table auth.role_groups cascade;
+
+create table auth.role_groups (
+ id serial8 primary key,
+ name character varying(255) not null,
+ description character varying(255)
+);
diff --git a/sql/tables/auth.role_groups_roles.sql b/sql/tables/auth.role_groups_roles.sql
new file mode 100644
index 0000000..7ebab21
--- /dev/null
+++ b/sql/tables/auth.role_groups_roles.sql
@@ -0,0 +1,7 @@
+drop table auth.role_groups_roles cascade;
+
+create table auth.role_groups_roles (
+ id serial8 primary key,
+ role_group_id bigint not null references auth.role_groups(id),
+ role_id bigint not null references auth.roles(id)
+);
diff --git a/sql/tables/auth.roles.sql b/sql/tables/auth.roles.sql
new file mode 100644
index 0000000..f5873fe
--- /dev/null
+++ b/sql/tables/auth.roles.sql
@@ -0,0 +1,7 @@
+drop table auth.roles cascade;
+
+create table auth.roles (
+ id serial8 primary key,
+ name character varying(255) not null,
+ description character varying(255)
+);
diff --git a/sql/tables/auth.user_session_objects.sql b/sql/tables/auth.user_session_objects.sql
new file mode 100644
index 0000000..aedfb42
--- /dev/null
+++ b/sql/tables/auth.user_session_objects.sql
@@ -0,0 +1,8 @@
+drop table auth.user_session_objects cascade;
+
+create table auth.user_session_objects (
+ id serial8 primary key,
+ user_session_id bigint not null references auth.user_sessions(id),
+ session_key character varying(255),
+ serialization text
+);
diff --git a/sql/tables/auth.user_sessions.sql b/sql/tables/auth.user_sessions.sql
new file mode 100644
index 0000000..2629d62
--- /dev/null
+++ b/sql/tables/auth.user_sessions.sql
@@ -0,0 +1,7 @@
+drop table auth.user_sessions cascade;
+
+create table auth.user_sessions (
+ id serial8 primary key,
+ sessionid character varying(255) not null,
+ datetime bigint not null
+);
diff --git a/sql/tables/auth.users.sql b/sql/tables/auth.users.sql
new file mode 100644
index 0000000..8eecf76
--- /dev/null
+++ b/sql/tables/auth.users.sql
@@ -0,0 +1,13 @@
+drop table auth.users cascade;
+
+create table auth.users (
+ id serial8 primary key,
+ username character varying(255) not null,
+ pwd bytea,
+ first_name character varying(255) not null,
+ last_name character varying(255) not null,
+ email character varying(255) not null,
+ phone character varying(255),
+ active bool,
+ created timestamp without time zone not null default now()
+);
diff --git a/sql/tables/auth.users_role_groups.sql b/sql/tables/auth.users_role_groups.sql
new file mode 100644
index 0000000..44cfe4a
--- /dev/null
+++ b/sql/tables/auth.users_role_groups.sql
@@ -0,0 +1,7 @@
+drop table auth.users_role_groups cascade;
+
+create table auth.users_role_groups (
+ id serial8 primary key,
+ user_id bigint not null references auth.users(id),
+ role_group_id bigint not null references auth.role_groups(id)
+);
diff --git a/sql/tables/auth.users_roles_append.sql b/sql/tables/auth.users_roles_append.sql
new file mode 100644
index 0000000..f6603e6
--- /dev/null
+++ b/sql/tables/auth.users_roles_append.sql
@@ -0,0 +1,7 @@
+drop table auth.users_roles_append cascade;
+
+create table auth.users_roles_append (
+ id serial8 primary key,
+ user_id bigint not null references auth.users(id),
+ role_id bigint not null references auth.roles(id)
+);
diff --git a/sql/tables/auth.users_roles_exclude.sql b/sql/tables/auth.users_roles_exclude.sql
new file mode 100644
index 0000000..e47385e
--- /dev/null
+++ b/sql/tables/auth.users_roles_exclude.sql
@@ -0,0 +1,7 @@
+drop table auth.users_roles_exclude cascade;
+
+create table auth.users_roles_exclude (
+ id serial8 primary key,
+ user_id bigint not null references auth.users(id),
+ role_id bigint not null references auth.roles(id)
+);
diff --git a/sql/tables/contact.contact_us.sql b/sql/tables/contact.contact_us.sql
new file mode 100644
index 0000000..0957e3c
--- /dev/null
+++ b/sql/tables/contact.contact_us.sql
@@ -0,0 +1,6 @@
+drop table contact.contact_us cascade;
+
+create table contact.contact_us (
+ id serial8 primary key,
+ content text
+);
diff --git a/sql/tables/contact.contact_us_posts.sql b/sql/tables/contact.contact_us_posts.sql
new file mode 100644
index 0000000..5e208cb
--- /dev/null
+++ b/sql/tables/contact.contact_us_posts.sql
@@ -0,0 +1,11 @@
+drop table contact.contact_us_posts cascade;
+
+create table contact.contact_us_posts (
+ id serial8 primary key,
+ first_name character varying(255) not null,
+ last_name character varying(255) not null,
+ email character varying(255) not null,
+ phone character varying(255),
+ submitted timestamp without time zone not null default now(),
+ comments text
+);
diff --git a/sql/tables/contact.contact_us_posts_read.sql b/sql/tables/contact.contact_us_posts_read.sql
new file mode 100644
index 0000000..80be27c
--- /dev/null
+++ b/sql/tables/contact.contact_us_posts_read.sql
@@ -0,0 +1,7 @@
+drop table contact.contact_us_posts_read cascade;
+
+create table contact.contact_us_posts_read (
+ id serial8 primary key,
+ contact_us_post_id bigint not null references contact.contact_us_posts(id),
+ user_id bigint not null references auth.users(id)
+);
diff --git a/sql/tables/general.about_us.sql b/sql/tables/general.about_us.sql
new file mode 100644
index 0000000..237065b
--- /dev/null
+++ b/sql/tables/general.about_us.sql
@@ -0,0 +1,6 @@
+drop table general.about_us cascade;
+
+create table general.about_us (
+ id serial8 primary key,
+ content text
+);
diff --git a/sql/tables/general.testimonials.sql b/sql/tables/general.testimonials.sql
new file mode 100644
index 0000000..64300a6
--- /dev/null
+++ b/sql/tables/general.testimonials.sql
@@ -0,0 +1,6 @@
+drop table general.testimonials cascade;
+
+create table general.testimonials (
+ id serial8 primary key,
+ content text
+);