feat: closes #11 and fixed database cons remaining open
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
-- drop table if exists model_data_point;
|
||||
-- drop table if exists model_defenitions;
|
||||
-- drop table if exists models;
|
||||
create table if not exists models (
|
||||
@@ -14,9 +15,20 @@ create table if not exists models (
|
||||
color_mode varchar (20)
|
||||
);
|
||||
|
||||
-- drop table if exists model_data_point;
|
||||
-- drop table if exists model_classes;
|
||||
create table if not exists model_classes (
|
||||
id uuid primary key default gen_random_uuid(),
|
||||
model_id uuid references models (id) not null,
|
||||
model_id uuid references models (id) on delete cascade,
|
||||
name varchar (70) not null
|
||||
);
|
||||
|
||||
-- drop table if exists model_data_point;
|
||||
create table if not exists model_data_point (
|
||||
id uuid primary key default gen_random_uuid(),
|
||||
class_id uuid references model_classes (id) on delete cascade,
|
||||
file_path text not null,
|
||||
-- 1 training
|
||||
-- 2 testing
|
||||
model_mode integer default 1
|
||||
);
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
-- drop table if exists tokens;
|
||||
|
||||
-- drop table if exists model_data_point;
|
||||
-- drop table if exists model_defenitions;
|
||||
-- drop table if exists models;
|
||||
|
||||
-- drop table if exists users;
|
||||
create table if not exists users (
|
||||
id uuid primary key default gen_random_uuid(),
|
||||
|
||||
Reference in New Issue
Block a user