Skip to content

Commit

Permalink
allow SQLite auto migrations (#927)
Browse files Browse the repository at this point in the history
* allow SQLite auto migrations

* simplify warning message
  • Loading branch information
dantownsend authored Jan 23, 2024
1 parent bd8ec50 commit 553e688
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions piccolo/apps/migrations/commands/new.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import datetime
import os
import string
import sys
import typing as t
from dataclasses import dataclass
from itertools import chain
Expand All @@ -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

Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 553e688

Please sign in to comment.