Scaffolding up reldata service's data migrations
Right now I'm just working within sqlite, but the migrations will need to be mirrored for PostgreSQL in the future in `migrations/postgres` Running this entails using the sqlx-cli (`cargo install sqlx-cli`) % sqlx migrate --source migrations/sqlite run
This commit is contained in:
parent
f017ea4660
commit
8a1a47669c
|
@ -8,3 +8,4 @@ build/
|
|||
*.tar.gz
|
||||
tmp*
|
||||
.hypothesis/
|
||||
otto.db
|
||||
|
|
|
@ -2937,6 +2937,7 @@ dependencies = [
|
|||
"stringprep",
|
||||
"thiserror",
|
||||
"url",
|
||||
"uuid",
|
||||
"webpki",
|
||||
"webpki-roots",
|
||||
"whoami",
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
--
|
||||
-- This migration adds the projects table which should be largely populated out
|
||||
-- of the projects.d directory
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS projects
|
||||
(
|
||||
uuid BLOB PRIMARY KEY NOT NULL,
|
||||
path TEXT NOT NULL,
|
||||
title TEXT NOT NULL,
|
||||
description TEXT,
|
||||
source_url TEXT,
|
||||
source_refspec TEXT,
|
||||
pipeline_path TEXT,
|
||||
pipeline_inline TEXT
|
||||
);
|
|
@ -0,0 +1 @@
|
|||
target/
|
|
@ -11,5 +11,5 @@ async-std = { version = "1", features = ["attributes"]}
|
|||
log = "~0.4.11"
|
||||
otto-models = { path = "../../crates/models" }
|
||||
pretty_env_logger = "~0.4.0"
|
||||
sqlx = { version = "~0.5.1", features = ["runtime-async-std-rustls", "postgres", "tls", "json", "sqlite", "chrono", "macros"]}
|
||||
sqlx = { version = "~0.5.1", features = ["runtime-async-std-rustls", "postgres", "tls", "json", "sqlite", "chrono", "macros", "uuid"]}
|
||||
tide = "~0.15.0"
|
||||
|
|
Loading…
Reference in New Issue