milvus/shards/manager.py

19 lines
343 B
Python
Raw Normal View History

2019-10-21 08:21:32 +00:00
import fire
2019-10-25 02:20:37 +00:00
from mishards import db, settings
2019-10-21 08:21:32 +00:00
class DBHandler:
@classmethod
def create_all(cls):
db.create_all()
@classmethod
def drop_all(cls):
db.drop_all()
if __name__ == '__main__':
2019-10-25 02:20:37 +00:00
db.init_db(settings.DefaultConfig.SQLALCHEMY_DATABASE_URI)
2019-10-25 06:32:08 +00:00
from mishards import models
2019-10-21 08:21:32 +00:00
fire.Fire(DBHandler)