generated from pure_sagacity/rust-starter
made adding a project work
changed the sql migration to make names unique
This commit is contained in:
@@ -11,6 +11,13 @@ pub struct Project {
|
||||
pub created_at: NaiveDateTime,
|
||||
}
|
||||
|
||||
#[derive(Insertable)]
|
||||
#[diesel(table_name = projects)]
|
||||
pub struct NewProject<'a> {
|
||||
pub id: &'a str,
|
||||
pub name: &'a str,
|
||||
}
|
||||
|
||||
#[derive(Debug, Queryable, Selectable)]
|
||||
#[diesel(table_name = secrets)]
|
||||
#[diesel(check_for_backend(diesel::sqlite::Sqlite))]
|
||||
|
||||
Reference in New Issue
Block a user