kjuulh
7bdf8393b1
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: kjuulh <contact@kjuulh.io>
18 lines
367 B
SQL
18 lines
367 B
SQL
-- Add migration script here
|
|
|
|
CREATE TABLE roots (
|
|
id UUID NOT NULL PRIMARY KEY,
|
|
root_name VARCHAR(255) UNIQUE NOT NULL
|
|
);
|
|
|
|
CREATE TABLE nodes (
|
|
id UUID NOT NULL PRIMARY KEY,
|
|
root_id UUID NOT NULL,
|
|
path VARCHAR NOT NULL,
|
|
item_type VARCHAR NOT NULL,
|
|
item_content JSONB
|
|
);
|
|
|
|
CREATE UNIQUE INDEX idx_unique_root_path ON nodes(root_id, path);
|
|
|