17 lines
570 B
SQL
17 lines
570 B
SQL
-- 931_add_refresh_tokens_updated_at_down.sql
|
|
-- Rollback: Remove updated_at column from refresh_tokens table
|
|
|
|
DO $$
|
|
BEGIN
|
|
IF EXISTS (
|
|
SELECT 1 FROM information_schema.columns
|
|
WHERE table_schema = 'public'
|
|
AND table_name = 'refresh_tokens'
|
|
AND column_name = 'updated_at'
|
|
) THEN
|
|
ALTER TABLE public.refresh_tokens DROP COLUMN updated_at;
|
|
RAISE NOTICE 'Dropped updated_at column from refresh_tokens table';
|
|
ELSE
|
|
RAISE NOTICE 'Column updated_at does not exist in refresh_tokens table';
|
|
END IF;
|
|
END $$;
|