20 lines
458 B
Python
20 lines
458 B
Python
from pathlib import Path
|
|
import sys
|
|
|
|
from sqlalchemy import text
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
sys.path.insert(0, str(ROOT))
|
|
|
|
from app.database import engine # noqa: E402
|
|
|
|
|
|
def main() -> None:
|
|
with engine.begin() as conn:
|
|
conn.execute(text("ALTER TABLE production_report_items MODIFY device_no VARCHAR(255) NOT NULL"))
|
|
print("production_report_items.device_no migrated to varchar(255)")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|