add sqlite migrations

we move our PostgreSQL specific migrations to a subdirectory.
The SQLite migrations have been created by running `diesel` against a
copy, and then fixing what's broken.
In the end i reduced all modifications to a single create, since we
*are* starting out fresh with SQLite.

n.b.: i'm not entirely happy with the results yet, because diesel
heavily modifies our `plume-models/src/schema.rs`.
I'll keep fiddling until we have the same types between the two
databases.
This commit is contained in:
Igor Galić
2018-09-15 13:38:09 +02:00
parent e5691f7b23
commit 1f8680c4c5
105 changed files with 251 additions and 69 deletions
+69 -69
View File
@@ -1,22 +1,22 @@
table! {
blog_authors (id) {
id -> Int4,
blog_id -> Int4,
author_id -> Int4,
id -> Nullable<Integer>,
blog_id -> Integer,
author_id -> Integer,
is_owner -> Bool,
}
}
table! {
blogs (id) {
id -> Int4,
actor_id -> Varchar,
title -> Varchar,
id -> Nullable<Integer>,
actor_id -> Text,
title -> Text,
summary -> Text,
outbox_url -> Varchar,
inbox_url -> Varchar,
instance_id -> Int4,
creation_date -> Timestamp,
outbox_url -> Text,
inbox_url -> Text,
instance_id -> Integer,
creation_date -> Integer,
ap_url -> Text,
private_key -> Nullable<Text>,
public_key -> Text,
@@ -25,13 +25,13 @@ table! {
table! {
comments (id) {
id -> Int4,
id -> Nullable<Integer>,
content -> Text,
in_response_to_id -> Nullable<Int4>,
post_id -> Int4,
author_id -> Int4,
creation_date -> Timestamp,
ap_url -> Nullable<Varchar>,
in_response_to_id -> Nullable<Integer>,
post_id -> Integer,
author_id -> Integer,
creation_date -> Integer,
ap_url -> Nullable<Text>,
sensitive -> Bool,
spoiler_text -> Text,
}
@@ -39,92 +39,92 @@ table! {
table! {
follows (id) {
id -> Int4,
follower_id -> Int4,
following_id -> Int4,
id -> Nullable<Integer>,
follower_id -> Integer,
following_id -> Integer,
ap_url -> Text,
}
}
table! {
instances (id) {
id -> Int4,
public_domain -> Varchar,
name -> Varchar,
id -> Nullable<Integer>,
public_domain -> Text,
name -> Text,
local -> Bool,
blocked -> Bool,
creation_date -> Timestamp,
creation_date -> Integer,
open_registrations -> Bool,
short_description -> Text,
long_description -> Text,
default_license -> Text,
long_description_html -> Varchar,
short_description_html -> Varchar,
long_description_html -> Text,
short_description_html -> Text,
}
}
table! {
likes (id) {
id -> Int4,
user_id -> Int4,
post_id -> Int4,
creation_date -> Timestamp,
ap_url -> Varchar,
id -> Nullable<Integer>,
user_id -> Integer,
post_id -> Integer,
ap_url -> Text,
creation_date -> Integer,
}
}
table! {
medias (id) {
id -> Int4,
id -> Nullable<Integer>,
file_path -> Text,
alt_text -> Text,
is_remote -> Bool,
remote_url -> Nullable<Text>,
sensitive -> Bool,
content_warning -> Nullable<Text>,
owner_id -> Int4,
owner_id -> Integer,
}
}
table! {
mentions (id) {
id -> Int4,
mentioned_id -> Int4,
post_id -> Nullable<Int4>,
comment_id -> Nullable<Int4>,
ap_url -> Varchar,
id -> Nullable<Integer>,
mentioned_id -> Integer,
post_id -> Nullable<Integer>,
comment_id -> Nullable<Integer>,
ap_url -> Text,
}
}
table! {
notifications (id) {
id -> Int4,
user_id -> Int4,
creation_date -> Timestamp,
kind -> Varchar,
object_id -> Int4,
id -> Nullable<Integer>,
user_id -> Integer,
creation_date -> Integer,
kind -> Text,
object_id -> Integer,
}
}
table! {
post_authors (id) {
id -> Int4,
post_id -> Int4,
author_id -> Int4,
id -> Nullable<Integer>,
post_id -> Integer,
author_id -> Integer,
}
}
table! {
posts (id) {
id -> Int4,
blog_id -> Int4,
slug -> Varchar,
title -> Varchar,
id -> Nullable<Integer>,
blog_id -> Integer,
slug -> Text,
title -> Text,
content -> Text,
published -> Bool,
license -> Varchar,
creation_date -> Timestamp,
ap_url -> Varchar,
license -> Text,
creation_date -> Integer,
ap_url -> Text,
subtitle -> Text,
source -> Text,
}
@@ -132,42 +132,42 @@ table! {
table! {
reshares (id) {
id -> Int4,
user_id -> Int4,
post_id -> Int4,
ap_url -> Varchar,
creation_date -> Timestamp,
id -> Nullable<Integer>,
user_id -> Integer,
post_id -> Integer,
ap_url -> Text,
creation_date -> Integer,
}
}
table! {
tags (id) {
id -> Int4,
id -> Nullable<Integer>,
tag -> Text,
is_hastag -> Bool,
post_id -> Int4,
post_id -> Integer,
}
}
table! {
users (id) {
id -> Int4,
username -> Varchar,
display_name -> Varchar,
outbox_url -> Varchar,
inbox_url -> Varchar,
id -> Nullable<Integer>,
username -> Text,
display_name -> Text,
outbox_url -> Text,
inbox_url -> Text,
is_admin -> Bool,
summary -> Text,
email -> Nullable<Text>,
hashed_password -> Nullable<Text>,
instance_id -> Int4,
creation_date -> Timestamp,
instance_id -> Integer,
creation_date -> Integer,
ap_url -> Text,
private_key -> Nullable<Text>,
public_key -> Text,
shared_inbox_url -> Nullable<Varchar>,
followers_endpoint -> Varchar,
avatar_id -> Nullable<Int4>,
shared_inbox_url -> Nullable<Text>,
followers_endpoint -> Text,
avatar_id -> Nullable<Integer>,
last_fetched_date -> Timestamp,
}
}