40097-vm/db/migrations/036_create_marketing_costos_table.sql
2026-05-10 16:22:58 +00:00

16 lines
695 B
SQL

-- Migration: Create marketing_costos table
CREATE TABLE IF NOT EXISTS marketing_costos (
id INT AUTO_INCREMENT PRIMARY KEY,
video_id INT NOT NULL,
costo_producto DECIMAL(10, 2) DEFAULT 0.00,
costo_fijo_film DECIMAL(10, 2) DEFAULT 0.00,
comision_asesora DECIMAL(10, 2) DEFAULT 0.00,
delivery DECIMAL(10, 2) DEFAULT 0.00,
costo_publicitario DECIMAL(10, 2) DEFAULT 0.00,
inversion_total DECIMAL(10, 2) DEFAULT 0.00,
promo_1 VARCHAR(255) DEFAULT '',
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
FOREIGN KEY (video_id) REFERENCES marketing_videos(id) ON DELETE CASCADE
);