mirror of https://git.sr.ht/~sircmpwn/hub.sr.ht
add database stamp for core.sr.ht
This commit is contained in:
parent
981622c92f
commit
2b98206e43
|
@ -9,6 +9,8 @@ Idempotent. If the tables already exist, they will not be re-created.
|
||||||
import hubsrht.alembic
|
import hubsrht.alembic
|
||||||
import hubsrht.types
|
import hubsrht.types
|
||||||
|
|
||||||
|
import srht.alembic
|
||||||
|
|
||||||
from alembic import command
|
from alembic import command
|
||||||
from alembic.config import Config
|
from alembic.config import Config
|
||||||
from srht.config import cfg
|
from srht.config import cfg
|
||||||
|
@ -24,3 +26,8 @@ config = Config()
|
||||||
config.set_main_option("sqlalchemy.url", connection_string)
|
config.set_main_option("sqlalchemy.url", connection_string)
|
||||||
config.set_main_option("script_location", alembic_path)
|
config.set_main_option("script_location", alembic_path)
|
||||||
command.stamp(config, "head")
|
command.stamp(config, "head")
|
||||||
|
|
||||||
|
alembic_path = list(srht.alembic.__path__)[0]
|
||||||
|
|
||||||
|
config.set_main_option("script_location", alembic_path)
|
||||||
|
command.stamp(config, "head")
|
||||||
|
|
Loading…
Reference in New Issue