This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #![feature(proc_macro_hygiene, decl_macro)] | |
| /* Our extern crates */ | |
| #[macro_use] | |
| extern crate diesel; | |
| #[macro_use] | |
| extern crate rocket; | |
| extern crate dotenv; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [package] | |
| name = "heroes" | |
| version = "0.1.0" | |
| authors = ["luisvonmuller <[email protected]>"] | |
| edition = "2018" | |
| [dependencies] | |
| rocket = "0.4.5" | |
| rocket_codegen = "0.4.5" | |
| diesel = { version = "1.4.5", features = ["postgres"] } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DROP TABLE heroes; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TABLE heroes ( | |
| id SERIAL PRIMARY KEY, | |
| fantasy_name VARCHAR NOT NULL, | |
| real_name VARCHAR NULL, | |
| spotted_photo TEXT NOT NULL, | |
| strength_level INT NOT NULL DEFAULT 0 | |
| ); |
NewerOlder