Skip to content

Commit

Permalink
user_id for presentation
Browse files Browse the repository at this point in the history
  • Loading branch information
subhojit777 committed May 24, 2019
1 parent 18b5602 commit 01a98d3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions migrations/2019-05-23-032722_create_presentations/up.sql
@@ -1,5 +1,6 @@
CREATE TABLE presentations (
id INT PRIMARY KEY AUTO_INCREMENT,
title VARCHAR(255) NOT NULL,
user_id INT NOT NULL,
created TIMESTAMP NOT NULL
)
2 changes: 2 additions & 0 deletions src/models.rs
Expand Up @@ -80,6 +80,7 @@ pub struct GetAnswerById(pub i32);
pub struct Presentation {
id: i32,
title: String,
user_id: i32,
created: NaiveDateTime,
}

Expand All @@ -88,6 +89,7 @@ pub struct Presentation {
#[table_name = "presentations"]
pub struct NewPresentation {
title: String,
user_id: i32,
created: NaiveDateTime,
}

Expand Down
1 change: 1 addition & 0 deletions src/schema.rs
Expand Up @@ -12,6 +12,7 @@ table! {
presentations (id) {
id -> Integer,
title -> Varchar,
user_id -> Integer,
created -> Timestamp,
}
}
Expand Down

0 comments on commit 01a98d3

Please sign in to comment.