fix: make literals field value not optional
This commit is contained in:
parent
c977500ee4
commit
3f2ee083cd
@ -0,0 +1,2 @@
|
|||||||
|
ALTER TABLE literals
|
||||||
|
ALTER COLUMN value DROP NOT NULL;
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
ALTER TABLE literals
|
||||||
|
ALTER COLUMN value SET NOT NULL;
|
||||||
@ -3,13 +3,14 @@
|
|||||||
#![allow(unused)]
|
#![allow(unused)]
|
||||||
#![allow(clippy::all)]
|
#![allow(clippy::all)]
|
||||||
|
|
||||||
|
|
||||||
use diesel::prelude::*;
|
use diesel::prelude::*;
|
||||||
#[derive(Queryable, Debug)]
|
#[derive(Queryable, Debug)]
|
||||||
#[diesel(table_name = literals)]
|
#[diesel(table_name = literals)]
|
||||||
pub struct Literal {
|
pub struct Literal {
|
||||||
pub id: i32,
|
pub id: i32,
|
||||||
pub token: String,
|
pub token: String,
|
||||||
pub value: Option<String>,
|
pub value: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Queryable, Debug)]
|
#[derive(Queryable, Debug)]
|
||||||
@ -27,3 +28,4 @@ pub struct User {
|
|||||||
pub id: i64,
|
pub id: i64,
|
||||||
pub is_admin: bool,
|
pub is_admin: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@ diesel::table! {
|
|||||||
id -> Int4,
|
id -> Int4,
|
||||||
#[max_length = 255]
|
#[max_length = 255]
|
||||||
token -> Varchar,
|
token -> Varchar,
|
||||||
value -> Nullable<Text>,
|
value -> Text,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -26,4 +26,8 @@ diesel::table! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
diesel::allow_tables_to_appear_in_same_query!(literals, messages, users,);
|
diesel::allow_tables_to_appear_in_same_query!(
|
||||||
|
literals,
|
||||||
|
messages,
|
||||||
|
users,
|
||||||
|
);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user