mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-05-05 00:05:12 -04:00
feat: Add xmr-btc-swap repo in subdirectory
This commit is contained in:
parent
462f3b2e6f
commit
757183e857
526 changed files with 41757 additions and 1 deletions
15
src-xmr-btc-swap/swap/sqlite_dev_setup.sh
Executable file
15
src-xmr-btc-swap/swap/sqlite_dev_setup.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
# run this script from the swap dir
|
||||
# make sure you have sqlx-cli installed: cargo install --version 0.6.3 sqlx-cli
|
||||
# it's advised for the sqlx-cli to be the same version as specified in cargo.toml
|
||||
|
||||
# this script creates a temporary sqlite database
|
||||
# then runs the migration scripts to create the tables (migrations folder)
|
||||
# then it prepares the offline sqlx-data.json rust mappings
|
||||
DATABASE_URL=sqlite:tempdb cargo sqlx database create
|
||||
DATABASE_URL=sqlite:tempdb cargo sqlx migrate run
|
||||
# needs the absolute path here
|
||||
# https://github.com/launchbadge/sqlx/issues/1399
|
||||
DB_PATH=$(readlink -f tempdb)
|
||||
DATABASE_URL="sqlite:$DB_PATH" cargo sqlx prepare -- --bin swap
|
Loading…
Add table
Add a link
Reference in a new issue