update migrations

This commit is contained in:
Nico
2025-09-17 21:53:27 +02:00
parent 7d7815a4bd
commit 3252d45409
9 changed files with 28 additions and 18 deletions

View File

@@ -1,9 +0,0 @@
-- migrate:up
CREATE TABLE PathNode (
id integer primary key,
title text,
description text
);
-- migrate:down
-- DROP TABLE PathNode;

View File

@@ -0,0 +1,2 @@
DROP TABLE pathVersions;
DROP TABLE path;

View File

@@ -0,0 +1,12 @@
CREATE TABLE path (
id integer primary key,
title text,
description text,
versions text
);
CREATE TABLE pathVersions (
pathId integer references path(id),
versionNumber string,
primary key (pathId, versionNumber)
);

View File

@@ -1,9 +0,0 @@
-- migrate:up
create table NodeExercise (
id integer primary key,
ex_type text,
content text
);
-- migrate:down
-- DROP TABLE NodeExercise;

View File

@@ -0,0 +1 @@
DROP TABLE node;

View File

@@ -0,0 +1,6 @@
CREATE TABLE node (
id integer primary key,
title text,
description text,
pathId integer references path(id)
);

View File

@@ -0,0 +1 @@
DROP TABLE exercise;

View File

@@ -0,0 +1,6 @@
create table exercise (
id integer primary key,
ex_type text,
content text,
nodeId integer references node(id)
);