mirror of
https://github.com/13hannes11/ics-proxy.git
synced 2024-09-06 08:01:41 +02:00
add migrations
This commit is contained in:
5
migrations/20240425185919_inital_db_scheme.sql
Normal file
5
migrations/20240425185919_inital_db_scheme.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- Add migration script here
|
||||
CREATE TABLE IF NOT EXISTS LINKS(
|
||||
UUID TEXT NOT NULL PRIMARY KEY,
|
||||
DESTINATION TEXT NOT NULL
|
||||
);
|
||||
@@ -292,6 +292,10 @@ async fn main() -> std::io::Result<()> {
|
||||
.await
|
||||
.expect("could not create db pool");
|
||||
|
||||
sqlx::migrate!("./migrations")
|
||||
.run(&db_pool)
|
||||
.await.unwrap();
|
||||
|
||||
println!(
|
||||
"Listening on: {}://{}, open browser and visit have a try!",
|
||||
protocol, base_url
|
||||
|
||||
Reference in New Issue
Block a user