PHP Classes

File: database/migrations/v1.11.0.64_mrc_local_handles.php

Recommend this page to a friend!
  Packages of Matthew Asham   Binkterm PHP   database/migrations/v1.11.0.64_mrc_local_handles.php   Download  
File: database/migrations/v1.11.0.64_mrc_local_handles.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Binkterm PHP
Bulletin board system based on the Web
Author: By
Last change:
Date: 5 days ago
Size: 550 bytes
 

Contents

Class file image Download
<?php
/**
 * Migration: 1.11.0.64 - add active local MRC handle mapping
 */

$db->exec("
    CREATE TABLE IF NOT EXISTS mrc_local_handles (
        user_id INTEGER PRIMARY KEY REFERENCES users(id) ON DELETE CASCADE,
        username VARCHAR(30) NOT NULL,
        bbs_name VARCHAR(64) NOT NULL,
        connected_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
        last_seen TIMESTAMP DEFAULT CURRENT_TIMESTAMP
    )
"
);

$db->exec("
    CREATE INDEX IF NOT EXISTS idx_mrc_local_handles_last_seen
        ON mrc_local_handles(last_seen)
"
);

return
true;