Remove flask-migrate.
This commit is contained in:
parent
71a009e03c
commit
54b6e78a90
@ -3,9 +3,8 @@ MAINTAINER yohan <783b8c87@scimetis.net>
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
ENV TZ Europe/Paris
|
||||
RUN apt-get update && apt-get -y install python-pip python-mysqldb python-yaml
|
||||
RUN pip install flask-restx flask-sqlalchemy flask-migrate
|
||||
RUN pip install flask-restx flask-sqlalchemy
|
||||
WORKDIR /root
|
||||
COPY api.py /root/
|
||||
COPY migrate_db.sh /root/
|
||||
COPY entrypoint.sh /root/
|
||||
ENTRYPOINT ["/root/entrypoint.sh"]
|
||||
|
2
api.py
2
api.py
@ -2,7 +2,6 @@ from flask import Flask, request
|
||||
from flask_restx import Api, Resource, fields
|
||||
from functools import wraps
|
||||
from flask_sqlalchemy import SQLAlchemy
|
||||
from flask_migrate import Migrate
|
||||
import json
|
||||
import logging
|
||||
import yaml
|
||||
@ -262,5 +261,4 @@ api.add_namespace(ns_stock)
|
||||
api.add_namespace(ns_float_metric)
|
||||
api.add_namespace(ns_integer_metric)
|
||||
db.create_all()
|
||||
migrate = Migrate(app, db, compare_type=True)
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
/root/migrate_db.sh && exec flask run
|
||||
exec flask run
|
||||
|
@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
flask db init; flask db migrate -m "Database migration." && flask db upgrade
|
Loading…
Reference in New Issue
Block a user