15 lines
618 B
SQL
15 lines
618 B
SQL
-- Migration: Create ingreso_borrador table for goods pre-reception
|
|
CREATE TABLE IF NOT EXISTS ingreso_borrador (
|
|
id INT AUTO_INCREMENT PRIMARY KEY,
|
|
nombre_producto VARCHAR(255) NOT NULL,
|
|
cantidad_esperada INT NOT NULL,
|
|
cantidad_recibida INT DEFAULT NULL,
|
|
estado ENUM('Pendiente', 'Conforme', 'Discrepancia') DEFAULT 'Pendiente',
|
|
usuario_registro_id INT NOT NULL,
|
|
usuario_verifico_id INT DEFAULT NULL,
|
|
observaciones TEXT,
|
|
fecha_registro TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
|
fecha_verificacion DATETIME DEFAULT NULL,
|
|
FOREIGN KEY (usuario_registro_id) REFERENCES users(id)
|
|
);
|