Files
Abschluss-Projekt/backend/database/migration_fix_image_dimensions.sql
2025-12-02 09:55:50 +01:00

13 lines
385 B
SQL

-- Migration to change width and height from FLOAT to INT in image table
-- Run this after updating the Images model
-- First, backup the table (optional but recommended)
-- CREATE TABLE image_backup AS SELECT * FROM image;
-- Alter the columns to INT type
ALTER TABLE image MODIFY COLUMN width INT;
ALTER TABLE image MODIFY COLUMN height INT;
-- Verify the changes
DESCRIBE image;