23 lines
		
	
	
		
			626 B
		
	
	
	
		
			SQL
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			626 B
		
	
	
	
		
			SQL
		
	
	
	
	
	
| -- drop table if exists model_defenitions;
 | |
| -- drop table if exists models;
 | |
| create table if not exists models (
 | |
|     id uuid primary key default gen_random_uuid(),
 | |
|     user_id uuid references users (id) not null,
 | |
|     name varchar (70) not null,
 | |
|     -- Status:
 | |
|     -- -1: failed preparing
 | |
|     -- 1: preparing
 | |
|     status integer default 1,
 | |
| 
 | |
|     width integer,
 | |
|     height integer,
 | |
|     color_mode varchar (20)
 | |
| );
 | |
| 
 | |
| -- 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,
 | |
|     name varchar (70) not null
 | |
| );
 |