Files
SIG-CM2.0/database/migrations/V015_ROLLBACK.sql

38 lines
1019 B
MySQL
Raw Normal View History

-- V015_ROLLBACK.sql
-- Reversa de V015__create_local_timezone_views.sql.
--
-- Elimina: dbo.v_AuditEvent_Local + dbo.v_SecurityEvent_Local
-- No toca datos: las tablas base AuditEvent y SecurityEvent no se modifican.
--
-- Idempotente: seguro para re-ejecutar.
-- Prerequisito: ningún objeto dependa de estas vistas (funciones, SPs, otras vistas).
SET QUOTED_IDENTIFIER ON;
SET ANSI_NULLS ON;
SET NOCOUNT ON;
GO
IF OBJECT_ID('dbo.v_AuditEvent_Local', 'V') IS NOT NULL
BEGIN
DROP VIEW dbo.v_AuditEvent_Local;
PRINT 'View dbo.v_AuditEvent_Local dropped.';
END
ELSE
PRINT 'View dbo.v_AuditEvent_Local does not exist — skip.';
GO
IF OBJECT_ID('dbo.v_SecurityEvent_Local', 'V') IS NOT NULL
BEGIN
DROP VIEW dbo.v_SecurityEvent_Local;
PRINT 'View dbo.v_SecurityEvent_Local dropped.';
END
ELSE
PRINT 'View dbo.v_SecurityEvent_Local does not exist — skip.';
GO
PRINT '';
PRINT 'V015 rolled back.';
PRINT ' - dbo.v_AuditEvent_Local removed.';
PRINT ' - dbo.v_SecurityEvent_Local removed.';
GO