first push

This commit is contained in:
Philipp
2025-11-28 12:50:27 +01:00
parent 471ea10341
commit 5220ffbe46
84 changed files with 1857 additions and 1527 deletions

View File

@@ -0,0 +1,4 @@
# Database module
from database.database import db
__all__ = ['db']

View File

@@ -0,0 +1,9 @@
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
def init_db(app):
"""Initialize database with app context"""
db.init_app(app)
with app.app_context():
db.create_all()

View File

@@ -0,0 +1,12 @@
-- Migration: Add width and height columns to image table
-- Date: 2025-11-27
USE myapp;
-- Add width and height columns to image table
ALTER TABLE `image`
ADD COLUMN `width` FLOAT NULL AFTER `image_path`,
ADD COLUMN `height` FLOAT NULL AFTER `width`;
-- Verify the changes
DESCRIBE `image`;