chore: config files and migrations

This commit is contained in:
Pau Figueras 2024-05-12 03:59:40 +02:00
pare ab5e5be558
commit c2ae874b2b
S'han modificat 6 arxius amb 1632 adicions i 0 eliminacions

1604
Cargo.lock generado Normal file

La diferencia del archivo ha sido suprimido porque es demasiado grande Cargar Diff

11
Cargo.toml Normal file
Veure arxiu

@ -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
Veure arxiu

@ -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
Veure arxiu

Veure arxiu

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

Veure arxiu

@ -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
)