punimtag/viewer-frontend/migrations/add-is-active-column.sql
Tanya de2144be2a feat: Add new scripts and update project structure for database management and user authentication
This commit introduces several new scripts for managing database operations, including user creation, permission grants, and data migrations. It also adds new documentation files to guide users through the setup and configuration processes. Additionally, the project structure is updated to enhance organization and maintainability, ensuring a smoother development experience for contributors. These changes support the ongoing transition to a web-based architecture and improve overall project functionality.
2026-01-06 13:53:24 -05:00

18 lines
380 B
SQL

-- Migration: Add is_active column to users table
-- Run this migration on the punimtag_auth database
-- Add is_active column (defaults to true for all users)
ALTER TABLE users
ADD COLUMN IF NOT EXISTS is_active BOOLEAN NOT NULL DEFAULT true;
-- Update existing users to be active (for backward compatibility)
UPDATE users
SET is_active = true
WHERE is_active IS NULL;