gourami

[UNMAINTAINED] Activitypub server in Rust
Log | Files | Refs | README | LICENSE

commit 8de6810dc1cf574a99b08c1a18fe6eeabf0cf815
parent 92009c2a7772200141e6123f56107f8e96a05c40
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Fri,  5 Jun 2020 16:17:46 -0500

Split out migration into a separate

Diffstat:
MCargo.lock | 2+-
Mmigrations/2020-04-13-014917_initialize/up.sql | 1-
Amigrations/2020-06-05-211246_add_wesbite/down.sql | 2++
Amigrations/2020-06-05-211246_add_wesbite/up.sql | 5+++++
Msrc/schema.rs | 2+-
5 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock @@ -649,7 +649,7 @@ dependencies = [ [[package]] name = "gourami_social" -version = "0.1.3" +version = "0.1.4" dependencies = [ "activitystreams", "ammonia", diff --git a/migrations/2020-04-13-014917_initialize/up.sql b/migrations/2020-04-13-014917_initialize/up.sql @@ -4,7 +4,6 @@ CREATE TABLE users ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, username VARCHAR(255), email VARCHAR(255), - website VARCHAR(255) default "", bio VARCHAR(1023) default "New here!", created_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP , password VARCHAR(255), diff --git a/migrations/2020-06-05-211246_add_wesbite/down.sql b/migrations/2020-06-05-211246_add_wesbite/down.sql @@ -0,0 +1 @@ +-- This file should undo anything in `up.sql` +\ No newline at end of file diff --git a/migrations/2020-06-05-211246_add_wesbite/up.sql b/migrations/2020-06-05-211246_add_wesbite/up.sql @@ -0,0 +1,5 @@ +-- Your SQL goes here + +ALTER TABLE users +add column website VARCHAR(255) default ""; + diff --git a/src/schema.rs b/src/schema.rs @@ -51,8 +51,8 @@ table! { id -> Integer, username -> Nullable<Text>, email -> Nullable<Text>, - website -> Nullable<Text>, bio -> Nullable<Text>, + website -> Varchar, created_time -> Nullable<Timestamp>, password -> Nullable<Text>, admin -> Nullable<Bool>,