Skip to content

Instantly share code, notes, and snippets.

View luisvonmuller's full-sized avatar
🏠
Working from home

Luís Von Müller luisvonmuller

🏠
Working from home
View GitHub Profile
#![feature(proc_macro_hygiene, decl_macro)]
/* Our extern crates */
#[macro_use]
extern crate diesel;
#[macro_use]
extern crate rocket;
extern crate dotenv;
[package]
name = "heroes"
version = "0.1.0"
authors = ["luisvonmuller <luis@vonmuller.com.br>"]
edition = "2018"
[dependencies]
rocket = "0.4.5"
rocket_codegen = "0.4.5"
diesel = { version = "1.4.5", features = ["postgres"] }
DROP TABLE heroes;
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
);