13 lines
385 B
SQL
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;
|