Updated database reset script to work from any directory.
This commit is contained in:
parent
f459cbdfda
commit
3611e4be34
@ -1,13 +1,16 @@
|
|||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
SERVER_DIR = "../src/MultiShop/Server"
|
|
||||||
|
SERVER_DIR = "src/MultiShop/Server"
|
||||||
DATA_DIR = "Data"
|
DATA_DIR = "Data"
|
||||||
DB_MIGRATE_CMD = "dotnet ef migrations add InitialCreate -o {0}"
|
DB_MIGRATE_CMD = "dotnet ef migrations add InitialCreate -o {0}"
|
||||||
DB_UPDATE_CMD = "dotnet ef database update"
|
DB_UPDATE_CMD = "dotnet ef database update"
|
||||||
|
|
||||||
print("Changing to database migrations directory.")
|
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
||||||
|
os.chdir("..")
|
||||||
os.chdir(SERVER_DIR)
|
os.chdir(SERVER_DIR)
|
||||||
|
print("Working in: " + os.getcwd())
|
||||||
|
|
||||||
migrationsDir = os.path.join(DATA_DIR, "Migrations")
|
migrationsDir = os.path.join(DATA_DIR, "Migrations")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user