chore: config files and migrations
This commit is contained in:
parent
ab5e5be558
commit
c2ae874b2b
6 changed files with 1632 additions and 0 deletions
1604
Cargo.lock
generated
Normal file
1604
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load 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…
Reference in a new issue