PHP Classes

File: SQL File

Recommend this page to a friend!
  Packages of Matthew Asham   Binkterm PHP   database/migrations/v1.7.3_unique_real_name.sql   Download  
File: database/migrations/v1.7.3_unique_real_name.sql
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Binkterm PHP
Bulletin board system based on the Web
Author: By
Last change:
Date: 5 days ago
Size: 438 bytes
 

Contents

Class file image Download
-- Add case-insensitive unique constraint on real_name for users table -- This prevents duplicate names like "Foo Bar" and "foo bar" -- Create unique index on lowercase real_name CREATE UNIQUE INDEX IF NOT EXISTS users_real_name_lower_idx ON users (LOWER(real_name)); -- Also add to pending_users to prevent registration conflicts CREATE UNIQUE INDEX IF NOT EXISTS pending_users_real_name_lower_idx ON pending_users (LOWER(real_name));