edited migration names
This commit is contained in:
parent
5c18b484a1
commit
0caa067fed
3
build.rs
3
build.rs
@ -7,6 +7,7 @@ use dotenv::dotenv;
|
|||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main(){
|
async fn main(){
|
||||||
|
println!("cargo:rerun-if-changed=migrations");
|
||||||
dotenv().ok();
|
dotenv().ok();
|
||||||
let mut dotenv_vars: HashMap<String, String> = HashMap::new();
|
let mut dotenv_vars: HashMap<String, String> = HashMap::new();
|
||||||
for (key, val) in env::vars() {
|
for (key, val) in env::vars() {
|
||||||
@ -14,7 +15,7 @@ async fn main(){
|
|||||||
}
|
}
|
||||||
let db_url = match dotenv_vars.get("DATABASE_URL") {
|
let db_url = match dotenv_vars.get("DATABASE_URL") {
|
||||||
Some(var) => {var},
|
Some(var) => {var},
|
||||||
None => {panic!("Nigga damn")}
|
None => {panic!("DATABASE_URL env var not found, set it!")}
|
||||||
};
|
};
|
||||||
let mut conn = match sqlx::MySqlConnection::connect(&db_url).await {
|
let mut conn = match sqlx::MySqlConnection::connect(&db_url).await {
|
||||||
Ok(res) => {res},
|
Ok(res) => {res},
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
-- Add migration script here
|
|
||||||
CREATE DATABASE IF NOT EXISTS usersvc;
|
|
||||||
USE usersvc;
|
|
@ -1,2 +1,6 @@
|
|||||||
cargo build --release
|
export CC_x86_64_unknown_linux_gnu=x86_64-unknown-linux-gnu-gcc
|
||||||
cp target/release/user-svc-actix /deploy/user-svc-actix
|
export CXX_x86_64_unknown_linux_gnu=x86_64-unknown-linux-gnu-g++
|
||||||
|
export AR_x86_64_unknown_linux_gnu=x86_64-unknown-linux-gnu-ar
|
||||||
|
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-unknown-linux-gnu-gcc
|
||||||
|
cargo build --release --target x86_64-unknown-linux-gnu
|
||||||
|
scp target/x86_64-unknown-linux-gnu/release/user-svc-actix deploy/Dockerfile main@backend.blancoinfante.com:~/executables/user-svc/
|
Loading…
Reference in New Issue
Block a user