Files
Bubberstation/tools/ezdb/__main__.py
Tom d91555b79e ezdb - A one click script to quickly setting up a development database (#75053) (#21458)
* ezdb - A one click script to quickly setting up a development database (#75053)

https://user-images.githubusercontent.com/35135081/235344815-8e825ba9-52cf-44e8-b8e2-a2aeb5d47276.mp4

- Downloads a portable MariaDB (doesn't pollute your main system)
- Sets up a database with a random password on port 1338 (configurable)
- Installs the initial schema
- Every time after, will run updates

Major versions right now explicitly escape hatch, because those
historically come with something like a Python script, and I do not want
it to pretend to work.

---------

Co-authored-by: san7890 <the@san7890.com>

* touchups

* oh well

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Useroth <37159550+Useroth@users.noreply.github.com>
2023-06-03 23:15:41 +02:00

16 lines
266 B
Python

import argparse
from .steps import STEPS
parser = argparse.ArgumentParser()
parser.add_argument("--port", type = int, default = 1338)
args = parser.parse_args()
for step in STEPS:
if not step.should_run():
continue
step.run(args)
print("Done!")