PHP Classes

File: SQL File

Recommend this page to a friend!
  Packages of Matthew Asham   Binkterm PHP   database/migrations/v1.10.8_shared_message_slugs.sql   Download  
File: database/migrations/v1.10.8_shared_message_slugs.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: 1 month ago
Size: 645 bytes
 

Contents

Class file image Download
-- Migration: v1.10.8 ? Add friendly slug URLs to shared_messages -- Allows shares to be accessed via /shared/{area}@{domain}/{slug} -- in addition to the existing /shared/{32-char-hex} token URLs. ALTER TABLE shared_messages ADD COLUMN IF NOT EXISTS area_identifier VARCHAR(200) DEFAULT NULL, ADD COLUMN IF NOT EXISTS slug VARCHAR(200) DEFAULT NULL; CREATE UNIQUE INDEX IF NOT EXISTS idx_shared_messages_area_slug ON shared_messages (area_identifier, slug) WHERE area_identifier IS NOT NULL AND slug IS NOT NULL; CREATE INDEX IF NOT EXISTS idx_shared_messages_slug ON shared_messages (slug) WHERE slug IS NOT NULL;