From 553e68872a60713daf0a7456f76d1b877a56235f Mon Sep 17 00:00:00 2001 From: Daniel Townsend Date: Tue, 23 Jan 2024 22:55:11 +0000 Subject: [PATCH] allow SQLite auto migrations (#927) * allow SQLite auto migrations * simplify warning message --- piccolo/apps/migrations/commands/new.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/piccolo/apps/migrations/commands/new.py b/piccolo/apps/migrations/commands/new.py index 09f6ac9e8..ff123aaa2 100644 --- a/piccolo/apps/migrations/commands/new.py +++ b/piccolo/apps/migrations/commands/new.py @@ -3,7 +3,6 @@ import datetime import os import string -import sys import typing as t from dataclasses import dataclass from itertools import chain @@ -22,6 +21,7 @@ from piccolo.conf.apps import AppConfig, Finder from piccolo.engine import SQLiteEngine from piccolo.utils.printing import print_heading +from piccolo.utils.warnings import colored_warning from .base import BaseMigrationManager @@ -232,7 +232,7 @@ async def new( """ engine = Finder().get_engine() if auto and isinstance(engine, SQLiteEngine): - sys.exit("Auto migrations aren't currently supported by SQLite.") + colored_warning("Auto migrations aren't fully supported by SQLite.") if app_name == "all" and not auto: raise ValueError(