chore: config files and migrations
This commit is contained in:
pare
ab5e5be558
commit
c2ae874b2b
S'han modificat 6 arxius amb 1632 adicions i 0 eliminacions
1604
Cargo.lock
generado
Normal file
1604
Cargo.lock
generado
Normal file
La diferencia del archivo ha sido suprimido porque es demasiado grande
Cargar Diff
11
Cargo.toml
Normal file
11
Cargo.toml
Normal 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
9
diesel.toml
Normal 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
0
migrations/.keep
Normal file
2
migrations/2024-03-28-000121_techs/down.sql
Normal file
2
migrations/2024-03-28-000121_techs/down.sql
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
-- This file should undo anything in `up.sql`
|
||||||
|
drop table if exists techs;
|
6
migrations/2024-03-28-000121_techs/up.sql
Normal file
6
migrations/2024-03-28-000121_techs/up.sql
Normal 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
|
||||||
|
)
|
Loading…
Referencia en una nova incidència