Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion alembic.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ prepend_sys_path = .
# are written from script.py.mako
# output_encoding = utf-8

sqlalchemy.url = sqlite:///db.sqlite
#sqlalchemy.url = sqlite:///db.sqlite


[post_write_hooks]
Expand Down
2 changes: 1 addition & 1 deletion bin/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ setup() {
mkdir alembic/versions
alembic revision --autogenerate -m initial
fi
alembic upgrade head
python migrate.py
fi
}
2 changes: 1 addition & 1 deletion freenit/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.3.10"
__version__ = "0.3.11"
2 changes: 1 addition & 1 deletion freenit/project/alembic.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ prepend_sys_path = .
# are written from script.py.mako
# output_encoding = utf-8

sqlalchemy.url = sqlite:///db.sqlite
#sqlalchemy.url = sqlite:///db.sqlite


[post_write_hooks]
Expand Down
16 changes: 16 additions & 0 deletions freenit/project/migrate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import importlib

from alembic import command
from alembic.config import Config
from name import app_name

alembic_cfg = Config("alembic.ini")


def db_setup():
importlib.import_module(f"{app_name}.app")
command.upgrade(alembic_cfg, "head")


if __name__ == "__main__":
db_setup()
16 changes: 16 additions & 0 deletions migrate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import importlib

from alembic import command
from alembic.config import Config
from name import app_name

alembic_cfg = Config("alembic.ini")


def db_setup():
importlib.import_module(f"{app_name}.app")
command.upgrade(alembic_cfg, "head")


if __name__ == "__main__":
db_setup()
Loading