diff options
Diffstat (limited to 'day9/task5_vue/backend/database/database.py')
| -rw-r--r-- | day9/task5_vue/backend/database/database.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/day9/task5_vue/backend/database/database.py b/day9/task5_vue/backend/database/database.py index 44554c7..20af3b4 100644 --- a/day9/task5_vue/backend/database/database.py +++ b/day9/task5_vue/backend/database/database.py @@ -27,13 +27,13 @@ def initialize_databases(configs, schemes): continue wrappers[config['name']] = wrapper - cursor = wrapper.connection.cursor() for scheme in schemes: Logger.get_logger().info(f'Preparing table "{scheme.meta["name"]}"...') - cursor.execute('START TRANSACTION; {} COMMIT;'.format(scheme.get_create_line())) + cursor.execute(scheme.get_create_line()) wrapper.schemes[scheme.meta['name']] = scheme cursor.close() + wrapper.connection.commit() def shutdown_databases(): |