mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
feat: Get started doc migration (#3102)
* feat: migrate empty document * chore: update collab rev * chore: fmt
This commit is contained in:
@ -6,7 +6,7 @@ edition = "2018"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
diesel = { version = "1.4.8", features = ["sqlite"] }
|
||||
diesel = { version = "1.4.8", features = ["sqlite", "chrono"] }
|
||||
diesel_derives = { version = "1.4.1", features = ["sqlite"] }
|
||||
diesel_migrations = { version = "1.4.0", features = ["sqlite"] }
|
||||
tracing = { version = "0.1", features = ["log"] }
|
||||
|
@ -0,0 +1,2 @@
|
||||
-- This file should undo anything in `up.sql`
|
||||
DROP TABLE user_data_migration_records;
|
@ -0,0 +1,6 @@
|
||||
-- Your SQL goes here
|
||||
CREATE TABLE user_data_migration_records (
|
||||
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
migration_name TEXT NOT NULL,
|
||||
executed_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
@ -12,6 +12,14 @@ diesel::table! {
|
||||
}
|
||||
}
|
||||
|
||||
diesel::table! {
|
||||
user_data_migration_records (id) {
|
||||
id -> Integer,
|
||||
migration_name -> Text,
|
||||
executed_at -> Timestamp,
|
||||
}
|
||||
}
|
||||
|
||||
diesel::table! {
|
||||
user_table (id) {
|
||||
id -> Text,
|
||||
@ -35,4 +43,9 @@ diesel::table! {
|
||||
}
|
||||
}
|
||||
|
||||
diesel::allow_tables_to_appear_in_same_query!(collab_snapshot, user_table, user_workspace_table,);
|
||||
diesel::allow_tables_to_appear_in_same_query!(
|
||||
collab_snapshot,
|
||||
user_data_migration_records,
|
||||
user_table,
|
||||
user_workspace_table,
|
||||
);
|
||||
|
Reference in New Issue
Block a user