1.0.0 #253

Merged
edraft merged 262 commits from 1.0.0 into master 2023-03-27 09:30:50 +02:00
Showing only changes of commit 124209c371 - Show all commits

View File

@ -1,3 +1,4 @@
import sys
from datetime import datetime
from cpl_core.application.application_extension_abc import ApplicationExtensionABC
@ -9,7 +10,6 @@ from bot_core.configuration.feature_flags_enum import FeatureFlagsEnum
from bot_core.configuration.feature_flags_settings import FeatureFlagsSettings
from bot_core.logging.database_logger import DatabaseLogger
from bot_data.service.migration_service import MigrationService
from bot_data.service.seeder_service import SeederService
class DatabaseExtension(ApplicationExtensionABC):
@ -25,3 +25,6 @@ class DatabaseExtension(ApplicationExtensionABC):
config.add_configuration("Database_StartTime", str(datetime.now()))
migrations: MigrationService = services.get_service(MigrationService)
migrations.migrate()
if config.get_configuration("MIGRATION_ONLY"):
logger.warn(__name__, "Migrations finished. Stopping application...")
sys.exit()