chore: config files and migrations

This commit is contained in:
Pau Figueras 2024-05-12 03:59:40 +02:00
parent ab5e5be558
commit c2ae874b2b
6 changed files with 1632 additions and 0 deletions

1604
Cargo.lock generated Normal file

File diff suppressed because it is too large Load diff

11
Cargo.toml Normal file
View file

@ -0,0 +1,11 @@
[package]
name = "home_api"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
rocket = {version = "0.5.0", features = ["json"]}
diesel = {version = "2.1.5", features = ["sqlite"]}
dotenvy = "0.15.7"

9
diesel.toml Normal file
View file

@ -0,0 +1,9 @@
# For documentation on how to configure this file,
# see https://diesel.rs/guides/configuring-diesel-cli
[print_schema]
file = "src/schema.rs"
custom_type_derives = ["diesel::query_builder::QueryId"]
[migrations_directory]
dir = "migrations"

0
migrations/.keep Normal file
View file

View file

@ -0,0 +1,2 @@
-- This file should undo anything in `up.sql`
drop table if exists techs;

View file

@ -0,0 +1,6 @@
-- Your SQL goes here
create table if not exists techs (
id int primary key,
tech_short_name text not_null,
tech_full_name text not_null
)