update migrations
This commit is contained in:
@@ -1,9 +0,0 @@
|
|||||||
-- migrate:up
|
|
||||||
CREATE TABLE PathNode (
|
|
||||||
id integer primary key,
|
|
||||||
title text,
|
|
||||||
description text
|
|
||||||
);
|
|
||||||
|
|
||||||
-- migrate:down
|
|
||||||
-- DROP TABLE PathNode;
|
|
||||||
2
src-tauri/migrations/0001_path_table.down.sql
Normal file
2
src-tauri/migrations/0001_path_table.down.sql
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
DROP TABLE pathVersions;
|
||||||
|
DROP TABLE path;
|
||||||
12
src-tauri/migrations/0001_path_table.up.sql
Normal file
12
src-tauri/migrations/0001_path_table.up.sql
Normal 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)
|
||||||
|
);
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
-- migrate:up
|
|
||||||
create table NodeExercise (
|
|
||||||
id integer primary key,
|
|
||||||
ex_type text,
|
|
||||||
content text
|
|
||||||
);
|
|
||||||
|
|
||||||
-- migrate:down
|
|
||||||
-- DROP TABLE NodeExercise;
|
|
||||||
1
src-tauri/migrations/0002_node_table.down.sql
Normal file
1
src-tauri/migrations/0002_node_table.down.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
DROP TABLE node;
|
||||||
6
src-tauri/migrations/0002_node_table.up.sql
Normal file
6
src-tauri/migrations/0002_node_table.up.sql
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
CREATE TABLE node (
|
||||||
|
id integer primary key,
|
||||||
|
title text,
|
||||||
|
description text,
|
||||||
|
pathId integer references path(id)
|
||||||
|
);
|
||||||
1
src-tauri/migrations/0003_exercise_table.down.sql
Normal file
1
src-tauri/migrations/0003_exercise_table.down.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
DROP TABLE exercise;
|
||||||
6
src-tauri/migrations/0003_exercise_table.up.sql
Normal file
6
src-tauri/migrations/0003_exercise_table.up.sql
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
create table exercise (
|
||||||
|
id integer primary key,
|
||||||
|
ex_type text,
|
||||||
|
content text,
|
||||||
|
nodeId integer references node(id)
|
||||||
|
);
|
||||||
Reference in New Issue
Block a user