Added all migrations
This commit is contained in:
parent
14af6e71c0
commit
b22ad29411
@ -1,3 +1,13 @@
|
||||
CREATE TABLE IF NOT EXISTS "realtor" (
|
||||
id UUID PRIMARY KEY,
|
||||
name VARCHAR NOT NULL,
|
||||
bio VARCHAR NOT NULL,
|
||||
phone_number VARCHAR,
|
||||
email VARCHAR NOT NULL,
|
||||
profile_picture_url VARCHAR NOT NULL,
|
||||
show_projects boolean NOT NULL,
|
||||
shortcode VARCHAR,
|
||||
remax_agent_id INT,
|
||||
time_created TIMESTAMPTZ NOT NULL,
|
||||
last_updated TIMESTAMPTZ NOT NULL
|
||||
);
|
@ -1 +1,8 @@
|
||||
-- Add migration script here
|
||||
CREATE TABLE IF NOT EXISTS "property" (
|
||||
id UUID PRIMARY KEY,
|
||||
project_id UUID,
|
||||
realtor_id UUID NOT NULL,
|
||||
media TEXT NOT NULL,
|
||||
time_created TIMESTAMPTZ NOT NULL,
|
||||
last_updated TIMESTAMPTZ NOT NULL
|
||||
);
|
@ -0,0 +1,7 @@
|
||||
CREATE TABLE IF NOT EXISTS "view" (
|
||||
id UUID PRIMARY KEY,
|
||||
thing_id UUID NOT NULL,
|
||||
thing_pk VARCHAR NOT NULL,
|
||||
trackable_id UUID NOT NULL,
|
||||
time_created TIMESTAMPTZ NOT NULL
|
||||
);
|
7
migrations/4_click.sql
Normal file
7
migrations/4_click.sql
Normal file
@ -0,0 +1,7 @@
|
||||
CREATE TABLE IF NOT EXISTS "click" (
|
||||
id UUID PRIMARY KEY,
|
||||
realtor_id UUID NOT NULL,
|
||||
clickable VARCHAR NOT NULL,
|
||||
trackable_id UUID NOT NULL,
|
||||
time_created TIMESTAMPTZ NOT NULL
|
||||
);
|
10
migrations/5_project.sql
Normal file
10
migrations/5_project.sql
Normal file
@ -0,0 +1,10 @@
|
||||
CREATE TABLE IF NOT EXISTS "project" (
|
||||
id UUID PRIMARY KEY,
|
||||
title VARCHAR,
|
||||
description TEXT NOT NULL,
|
||||
realtor_id UUID NOT NULL,
|
||||
media TEXT NOT NULL,
|
||||
order_index INTEGER,
|
||||
time_created TIMESTAMPTZ NOT NULL,
|
||||
last_updated TIMESTAMPTZ NOT NULL
|
||||
);
|
9
migrations/6_trackable.sql
Normal file
9
migrations/6_trackable.sql
Normal file
@ -0,0 +1,9 @@
|
||||
CREATE TABLE IF NOT EXISTS "trackable" (
|
||||
id UUID PRIMARY KEY,
|
||||
who_was UUID,
|
||||
ip_address VARCHAR NOT NULL,
|
||||
browser_width INTEGER NOT NULL,
|
||||
browser_height INTEGER NOT NULL,
|
||||
user_agent VARCHAR NOT NULL,
|
||||
time_created TIMESTAMPTZ NOT NULL
|
||||
);
|
@ -3,8 +3,6 @@ mod routes;
|
||||
mod services;
|
||||
mod utils;
|
||||
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user