/*************************************************************************
 * SPS Database Schema
 * MySql version
 *************************************************************************/

CREATE TABLE SpsDummy (
	dummy_id INTEGER PRIMARY KEY
);

/*************************************************************************
 * Logging
 *************************************************************************/
 
CREATE TABLE SpsLog (
    id          INT NOT NULL,
    logtime     TIMESTAMP NOT NULL,
    ident       CHAR(16) NOT NULL,
    priority    INT NOT NULL,
    message     VARCHAR(200),
    PRIMARY KEY (id)
);

/*************************************************************************
 * Users and Groups
 *************************************************************************/

CREATE TABLE SpsUser
(
 user_id         INTEGER PRIMARY KEY,
 email           VARCHAR(255) NOT NULL,
 password        VARCHAR(255) NOT NULL,
 name            VARCHAR(255),
 admin_notes     TEXT,
 UNIQUE (email)
)\g

CREATE TABLE SpsGroup
(
 group_id INTEGER PRIMARY KEY,
 name  VARCHAR(30) NOT NULL,
 descrip  VARCHAR(255)
)\g

CREATE TABLE SpsUserGroup
(
 user_id  INTEGER NOT NULL,
 group_id INTEGER NOT NULL,
 PRIMARY KEY (user_id, group_id)
)\g

CREATE TABLE SpsTicket
(
 ticket  CHAR(30) PRIMARY KEY,
 user_id  INTEGER NOT NULL,
 INDEX(user_id),
 when_created DATETIME,
 when_refreshed DATETIME
)\g

/*
 * Create the default users
 */
 
INSERT INTO SpsUser (user_id, email, password) VALUES (1, 'superuser@localhost',  'superuser')\g

/*
 * Create the groups
 */
 
INSERT INTO SpsGroup (group_id, name, descrip) VALUES (1, 'SUPER',  'SPS Super-admin')\g

/*
 * Superuser is in all groups
 */
 
INSERT INTO SpsUserGroup (user_id, group_id) VALUES (1, 1)\g

/*************************************************************************
 * PUBLIC Users and Groups
 *************************************************************************/

CREATE TABLE SpsPublicUser
(
 user_id         INTEGER PRIMARY KEY,
 email           VARCHAR(255) NOT NULL,
 password        VARCHAR(255) NOT NULL,
 UNIQUE (email)
)\g

CREATE TABLE SpsPublicGroup
(
 group_id INTEGER PRIMARY KEY,
 name  VARCHAR(30) NOT NULL,
 descrip  VARCHAR(255)
)\g

CREATE TABLE SpsPublicUserGroup
(
 user_id  INTEGER NOT NULL REFERENCES SpsUser (user_id),
 group_id INTEGER NOT NULL REFERENCES SpsGroup (group_id),
 PRIMARY KEY (user_id, group_id)
)\g

CREATE TABLE SpsPublicTicket
(
 ticket  CHAR(30) PRIMARY KEY,
 user_id  INTEGER NOT NULL REFERENCES SpsUser (user_id),
 when_created DATETIME,
 when_refreshed DATETIME
)\g

CREATE TABLE SpsPublicUserDetails
(
user_id          INTEGER PRIMARY KEY,
salutation       VARCHAR(255),
first_name       VARCHAR(255),
middle_name      VARCHAR(255),
last_name        VARCHAR(255),
title            VARCHAR(255),
org_name         VARCHAR(255),
org_addr1        VARCHAR(255),
org_addr2        VARCHAR(255),
org_city         VARCHAR(255),
org_state        VARCHAR(255),
org_zip          VARCHAR(255),
org_country      VARCHAR(255),
org_phone        VARCHAR(255),
org_fax          VARCHAR(255),
org_url          VARCHAR(255),
home_addr1       VARCHAR(255),
home_addr2       VARCHAR(255),
home_city        VARCHAR(255),
home_state       VARCHAR(255),
home_zip         VARCHAR(255),
home_country     VARCHAR(255),
home_phone       VARCHAR(255),
home_fax         VARCHAR(255),
home_url         VARCHAR(255),
created_at       DATETIME
)\g

/*************************************************************************
 * Sequences
 *************************************************************************/

CREATE TABLE SpsSequence
(
 name  VARCHAR(255) PRIMARY KEY,
 value  INTEGER
)\g

/*
 * Create the sequences
 */
 
INSERT INTO SpsSequence (name, value) VALUES ('SpsUserId', 100)\g
INSERT INTO SpsSequence (name, value) VALUES ('SpsGroupId', 100)\g

/*************************************************************************
 * ChangeLog
 *************************************************************************/

/*
 * The SpsChangelog table tracks all database changes.
 * Fields include:
 * -- Changetime: timestamp when change occurred
 * -- user_id: user who made the modification
 * -- user_name: name of the user who made the modification
 * -- table_name: table in which the modified record appears
 * -- pk: primary key of the modified record    
 * -- data: the record, URL-encoded
 */
 
CREATE TABLE SpsChangelog
(
 changetime INTEGER NOT NULL,
 user_id  INTEGER,
 user_name VARCHAR(200),
 table_name VARCHAR(100) NOT NULL,
 pk  VARCHAR(100) NOT NULL,
 data  TEXT,
 PRIMARY KEY (changetime, table_name, pk)
)\g

CREATE TABLE SpsRecordData
(
record_id                 INTEGER PRIMARY KEY,
record_table_name         VARCHAR(255),
record_pk                 VARCHAR(255),
UNIQUE(record_table_name, record_pk),
record_created_user_name  VARCHAR(255),
record_created_timestamp  DATETIME,
record_modified_user_name VARCHAR(255),
record_modified_timestamp DATETIME
)\g

/*************************************************************************
 * Workflow
 *************************************************************************/

CREATE TABLE SpsWorkflow
(
  table_name     VARCHAR(100) NOT NULL,
  pk             VARCHAR(100) NOT NULL,
  valid_from     INTEGER,
  valid_to       INTEGER,
  created_at     INTEGER,
  modified_at    INTEGER,
  status_set_at  INTEGER,
  created_by     VARCHAR(200),
  modified_by    VARCHAR(200),
  status_set_by  VARCHAR(200),
  status         VARCHAR(100),
  PRIMARY KEY (table_name, pk)
)\g

/*************************************************************************
 * Mailing Lists
 *************************************************************************/

/*
 * Table of mailing lists
 */
 
CREATE TABLE SpsMailList
(
  list_name                 VARCHAR(220) PRIMARY KEY,
  short_description         VARCHAR(255),
  subject                   VARCHAR(255),
  from_email                VARCHAR(255),
  code                      VARCHAR(255),
  text_footer               TEXT,
  html_footer               TEXT,
  long_description          TEXT,
  notes                     TEXT
)\g

/*
 * Subscriptions to mailing lists
 */

CREATE TABLE SpsMailUser
(
  user_id                  INTEGER,
  email                    VARCHAR(127) NOT NULL,
  list_name                VARCHAR(127) NOT NULL,
  first_name               VARCHAR(255),
  last_name                VARCHAR(255),
  format                   CHAR(10),
  PRIMARY KEY (email, list_name)
)\g

CREATE TABLE SpsMailUserBounce
(
  email                   VARCHAR(255) PRIMARY KEY,
  error_count             INTEGER,
  warning_count           INTEGER
)\g

CREATE TABLE SpsMailConfirmations
(
 email                   VARCHAR(255),
 first_name              VARCHAR(255),
 last_name               VARCHAR(255),
 format                  VARCHAR(255),
 list_names              VARCHAR(255),
 confirm_code            VARCHAR(255),
 requested_at            DATETIME,
 requested_ip            VARCHAR(255),
 confirmed_at            DATETIME,
 confirmed_ip            VARCHAR(255),
 is_confirmed            INTEGER
)\g

/*
 * Mailing list messages.
 * STATUS is one of DRAFT|QUEUE|SENT|ARCHIVE
 */
 
CREATE TABLE SpsMailMsg
(
  msg_id                   VARCHAR(220) PRIMARY KEY,
  status                   CHAR(32) NOT NULL,
  priority                 CHAR(32) NOT NULL,
  list_name                VARCHAR(255) NOT NULL,
  timestamp                VARCHAR(255) NOT NULL,
  subject                  VARCHAR(255) NOT NULL,
  from_email               VARCHAR(255) NOT NULL,
  text_msg                 MEDIUMTEXT,
  html_msg                 MEDIUMTEXT,
  notes                    TEXT
)\g

/*
 * Queued (outgoing) messages
 * STATUS is one of QUEUE|SENT|ERROR
 */
 
CREATE TABLE SpsMailQueue
(
  msg_id         VARCHAR(127) NOT NULL,
  email                  VARCHAR(127) NOT NULL,
  status                 CHAR(32) NOT NULL,
  PRIMARY KEY (msg_id, email)
)\g

/*
 * Message counts, with datestamp; used for throttling
 */
 
CREATE TABLE SpsMailBatchHistory
(
batch_id              INTEGER PRIMARY KEY,
batch_datestamp       DATETIME,
batch_count           INTEGER,
batch_comments        VARCHAR(255)
)\g

/*************************************************************************
 * Locks
 *************************************************************************/

CREATE TABLE SpsLock
(
 table_name              VARCHAR(100) NOT NULL,
 pk                      VARCHAR(100) NOT NULL,
 user_id                 INTEGER,
 user_name               VARCHAR(200),
 locktime                INTEGER NOT NULL,
 PRIMARY KEY (table_name, pk)
)\g

/*************************************************************************
 * File Creation Dates
 *************************************************************************/

/*
 * Publisher logs file creation dates here.  Used by alerts module
 * to determine when files have been created or changed.
 */
 
CREATE TABLE SpsFileCreationLog
(
  code                   VARCHAR(50) NOT NULL,
  path                   VARCHAR(200) NOT NULL,
  created_at             DATETIME,
  modified_at            DATETIME,
  PRIMARY KEY (code, path)
)\g

/*************************************************************************
 * Alerts
 *************************************************************************/

/*
 * delivery_schedule
 *    1 = daily
 *    2 = weekly
 */
 
CREATE TABLE SpsAlert
(
  id                    INTEGER PRIMARY KEY,
  email                 VARCHAR(125) NOT NULL,
  name                   VARCHAR(125) NOT NULL,
  is_active             INTEGER,
  created_at            DATETIME,
  delivery_schedule     INTEGER,
  search_query          VARCHAR(255) NOT NULL,
  search_index          VARCHAR(255) NOT NULL,
  code                  VARCHAR(100) NOT NULL,
  UNIQUE(email, name)
)\g

/*
 * This table always has exactly one row.
 */
 
CREATE TABLE SpsAlertLastSent
(
    one_row_only        INTEGER PRIMARY KEY,
    sent_at             DATETIME NOT NULL
)\g
INSERT INTO SpsAlertLastSent(one_row_only, sent_at) VALUES (1, '1970-01-01')\g

/*
 * Alert queue.  Status is one of QUEUE or SENT.
 */
 
CREATE TABLE SpsAlertQueue
(
    id                 INTEGER PRIMARY KEY,
    queued_at          DATETIME,
    delivered_at       DATETIME,
    status             VARCHAR(50),
    email              VARCHAR(255),
    subject            VARCHAR(255),
    body               TEXT
)\g

/*************************************************************************
 * Related Links
 *************************************************************************/

CREATE TABLE SpsRelatedLinks
(
        id                    INTEGER PRIMARY KEY,
        code                  VARCHAR(100) NOT NULL,
        from_path             VARCHAR(255) NOT NULL,
        to_url                VARCHAR(255) NOT NULL,
        prefix_text           VARCHAR(255),
        body_text             VARCHAR(255),
        suffix_text           VARCHAR(255),
        sequence              INTEGER,
        listed_date           DATE,
        delisted_date         DATE
)\g


/*************************************************************************
 * Documents and Clipboard
 *************************************************************************/

/*
 * Documents: Metadata about media files.
 * This table is required for the clipboard -- i.e. documents
 * which will be in the clipboard must be entered in the Documents table.
 */
 
CREATE TABLE SpsClipboards
(
        name                VARCHAR(100) PRIMARY KEY,
        created_at          DATETIME,
        modified_at         DATETIME
)\g
        
        
CREATE TABLE SpsClipboardDocuments
(
        clipboard_name      VARCHAR(100) NOT NULL,
        url                 VARCHAR(100) NOT NULL,
        PRIMARY KEY (clipboard_name, url)
)\g

CREATE TABLE SpsClipboardObjects
(
    clipboard_name      VARCHAR(100) NOT NULL,
    object_name         VARCHAR(100) NOT NULL,
    pk                  VARCHAR(100) NOT NULL,
    PRIMARY KEY (clipboard_name, object_name, pk)
)\g


/*************************************************************************
 * Letters
 *************************************************************************/
/*
 * Its sometimes convenient to select a set of letters
 */

CREATE TABLE SpsLetters
(
     letter           CHAR(1) PRIMARY KEY
)\g
INSERT INTO SpsLetters VALUES ('A')\g
INSERT INTO SpsLetters VALUES ('B')\g
INSERT INTO SpsLetters VALUES ('C')\g
INSERT INTO SpsLetters VALUES ('D')\g
INSERT INTO SpsLetters VALUES ('E')\g
INSERT INTO SpsLetters VALUES ('F')\g
INSERT INTO SpsLetters VALUES ('G')\g
INSERT INTO SpsLetters VALUES ('H')\g
INSERT INTO SpsLetters VALUES ('I')\g
INSERT INTO SpsLetters VALUES ('J')\g
INSERT INTO SpsLetters VALUES ('K')\g
INSERT INTO SpsLetters VALUES ('L')\g
INSERT INTO SpsLetters VALUES ('M')\g
INSERT INTO SpsLetters VALUES ('N')\g
INSERT INTO SpsLetters VALUES ('O')\g
INSERT INTO SpsLetters VALUES ('P')\g
INSERT INTO SpsLetters VALUES ('Q')\g
INSERT INTO SpsLetters VALUES ('R')\g
INSERT INTO SpsLetters VALUES ('S')\g
INSERT INTO SpsLetters VALUES ('T')\g
INSERT INTO SpsLetters VALUES ('U')\g
INSERT INTO SpsLetters VALUES ('V')\g
INSERT INTO SpsLetters VALUES ('W')\g
INSERT INTO SpsLetters VALUES ('X')\g
INSERT INTO SpsLetters VALUES ('Y')\g
INSERT INTO SpsLetters VALUES ('Z')\g

/*************************************************************************
 * Months, Years
 *************************************************************************/
/*
 * Its sometimes convenient to select a list of months and years
 */

CREATE TABLE SpsMonths
(
    first_day     DATE PRIMARY KEY
)\g

INSERT INTO SpsMonths (first_day) VALUES ('1970-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1970-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1970-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1970-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1970-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1970-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1970-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1970-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1970-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1970-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1970-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1970-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1971-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1971-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1971-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1971-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1971-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1971-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1971-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1971-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1971-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1971-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1971-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1971-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1972-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1972-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1972-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1972-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1972-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1972-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1972-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1972-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1972-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1972-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1972-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1972-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1973-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1973-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1973-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1973-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1973-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1973-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1973-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1973-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1973-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1973-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1973-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1973-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1974-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1974-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1974-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1974-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1974-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1974-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1974-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1974-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1974-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1974-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1974-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1974-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1975-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1975-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1975-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1975-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1975-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1975-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1975-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1975-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1975-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1975-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1975-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1975-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1976-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1976-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1976-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1976-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1976-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1976-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1976-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1976-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1976-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1976-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1976-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1976-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1977-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1977-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1977-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1977-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1977-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1977-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1977-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1977-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1977-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1977-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1977-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1977-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1978-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1978-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1978-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1978-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1978-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1978-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1978-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1978-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1978-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1978-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1978-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1978-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1979-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1979-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1979-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1979-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1979-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1979-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1979-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1979-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1979-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1979-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1979-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1979-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1980-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1980-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1980-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1980-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1980-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1980-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1980-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1980-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1980-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1980-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1980-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1980-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1981-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1981-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1981-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1981-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1981-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1981-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1981-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1981-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1981-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1981-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1981-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1981-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1982-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1982-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1982-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1982-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1982-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1982-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1982-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1982-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1982-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1982-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1982-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1982-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1983-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1983-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1983-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1983-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1983-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1983-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1983-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1983-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1983-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1983-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1983-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1983-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1984-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1984-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1984-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1984-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1984-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1984-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1984-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1984-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1984-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1984-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1984-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1984-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1985-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1985-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1985-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1985-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1985-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1985-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1985-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1985-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1985-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1985-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1985-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1985-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1986-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1986-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1986-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1986-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1986-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1986-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1986-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1986-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1986-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1986-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1986-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1986-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1987-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1987-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1987-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1987-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1987-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1987-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1987-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1987-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1987-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1987-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1987-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1987-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1988-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1988-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1988-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1988-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1988-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1988-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1988-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1988-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1988-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1988-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1988-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1988-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1989-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1989-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1989-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1989-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1989-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1989-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1989-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1989-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1989-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1989-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1989-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1989-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1990-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1990-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1990-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1990-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1990-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1990-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1990-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1990-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1990-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1990-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1990-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1990-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1991-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1991-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1991-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1991-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1991-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1991-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1991-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1991-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1991-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1991-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1991-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1991-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1992-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1992-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1992-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1992-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1992-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1992-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1992-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1992-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1992-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1992-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1992-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1992-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1993-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1993-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1993-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1993-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1993-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1993-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1993-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1993-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1993-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1993-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1993-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1993-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1994-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1994-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1994-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1994-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1994-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1994-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1994-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1994-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1994-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1994-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1994-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1994-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1995-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1995-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1995-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1995-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1995-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1995-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1995-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1995-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1995-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1995-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1995-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1995-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1996-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1996-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1996-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1996-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1996-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1996-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1996-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1996-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1996-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1996-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1996-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1996-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1997-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1997-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1997-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1997-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1997-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1997-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1997-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1997-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1997-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1997-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1997-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1997-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1998-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1998-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1998-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1998-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1998-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1998-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1998-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1998-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1998-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1998-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1998-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1998-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1999-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1999-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1999-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1999-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1999-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1999-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1999-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1999-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1999-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1999-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1999-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('1999-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2000-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2000-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2000-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2000-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2000-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2000-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2000-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2000-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2000-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2000-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2000-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2000-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2001-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2001-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2001-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2001-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2001-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2001-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2001-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2001-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2001-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2001-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2001-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2001-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2002-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2002-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2002-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2002-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2002-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2002-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2002-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2002-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2002-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2002-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2002-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2002-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2003-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2003-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2003-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2003-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2003-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2003-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2003-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2003-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2003-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2003-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2003-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2003-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2004-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2004-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2004-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2004-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2004-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2004-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2004-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2004-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2004-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2004-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2004-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2004-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2005-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2005-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2005-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2005-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2005-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2005-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2005-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2005-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2005-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2005-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2005-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2005-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2006-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2006-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2006-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2006-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2006-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2006-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2006-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2006-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2006-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2006-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2006-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2006-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2007-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2007-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2007-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2007-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2007-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2007-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2007-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2007-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2007-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2007-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2007-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2007-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2008-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2008-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2008-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2008-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2008-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2008-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2008-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2008-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2008-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2008-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2008-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2008-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2009-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2009-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2009-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2009-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2009-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2009-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2009-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2009-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2009-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2009-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2009-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2009-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2010-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2010-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2010-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2010-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2010-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2010-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2010-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2010-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2010-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2010-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2010-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2010-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2011-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2011-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2011-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2011-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2011-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2011-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2011-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2011-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2011-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2011-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2011-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2011-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2012-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2012-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2012-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2012-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2012-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2012-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2012-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2012-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2012-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2012-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2012-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2012-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2013-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2013-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2013-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2013-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2013-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2013-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2013-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2013-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2013-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2013-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2013-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2013-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2014-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2014-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2014-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2014-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2014-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2014-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2014-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2014-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2014-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2014-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2014-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2014-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2015-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2015-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2015-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2015-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2015-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2015-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2015-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2015-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2015-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2015-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2015-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2015-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2016-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2016-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2016-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2016-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2016-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2016-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2016-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2016-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2016-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2016-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2016-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2016-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2017-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2017-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2017-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2017-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2017-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2017-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2017-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2017-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2017-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2017-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2017-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2017-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2018-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2018-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2018-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2018-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2018-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2018-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2018-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2018-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2018-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2018-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2018-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2018-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2019-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2019-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2019-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2019-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2019-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2019-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2019-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2019-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2019-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2019-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2019-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2019-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2020-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2020-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2020-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2020-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2020-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2020-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2020-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2020-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2020-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2020-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2020-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2020-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2021-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2021-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2021-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2021-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2021-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2021-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2021-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2021-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2021-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2021-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2021-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2021-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2022-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2022-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2022-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2022-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2022-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2022-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2022-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2022-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2022-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2022-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2022-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2022-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2023-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2023-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2023-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2023-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2023-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2023-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2023-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2023-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2023-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2023-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2023-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2023-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2024-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2024-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2024-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2024-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2024-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2024-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2024-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2024-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2024-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2024-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2024-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2024-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2025-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2025-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2025-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2025-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2025-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2025-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2025-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2025-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2025-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2025-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2025-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2025-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2026-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2026-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2026-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2026-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2026-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2026-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2026-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2026-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2026-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2026-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2026-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2026-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2027-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2027-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2027-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2027-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2027-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2027-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2027-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2027-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2027-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2027-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2027-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2027-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2028-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2028-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2028-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2028-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2028-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2028-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2028-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2028-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2028-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2028-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2028-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2028-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2029-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2029-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2029-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2029-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2029-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2029-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2029-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2029-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2029-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2029-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2029-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2029-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2030-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2030-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2030-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2030-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2030-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2030-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2030-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2030-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2030-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2030-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2030-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2030-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2031-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2031-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2031-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2031-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2031-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2031-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2031-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2031-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2031-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2031-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2031-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2031-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2032-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2032-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2032-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2032-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2032-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2032-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2032-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2032-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2032-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2032-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2032-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2032-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2033-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2033-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2033-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2033-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2033-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2033-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2033-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2033-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2033-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2033-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2033-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2033-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2034-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2034-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2034-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2034-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2034-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2034-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2034-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2034-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2034-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2034-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2034-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2034-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2035-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2035-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2035-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2035-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2035-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2035-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2035-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2035-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2035-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2035-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2035-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2035-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2036-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2036-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2036-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2036-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2036-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2036-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2036-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2036-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2036-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2036-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2036-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2036-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2037-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2037-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2037-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2037-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2037-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2037-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2037-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2037-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2037-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2037-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2037-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2037-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2038-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2038-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2038-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2038-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2038-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2038-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2038-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2038-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2038-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2038-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2038-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2038-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2039-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2039-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2039-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2039-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2039-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2039-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2039-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2039-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2039-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2039-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2039-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2039-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2040-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2040-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2040-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2040-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2040-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2040-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2040-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2040-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2040-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2040-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2040-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2040-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2041-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2041-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2041-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2041-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2041-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2041-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2041-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2041-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2041-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2041-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2041-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2041-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2042-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2042-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2042-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2042-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2042-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2042-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2042-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2042-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2042-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2042-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2042-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2042-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2043-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2043-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2043-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2043-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2043-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2043-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2043-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2043-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2043-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2043-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2043-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2043-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2044-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2044-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2044-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2044-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2044-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2044-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2044-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2044-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2044-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2044-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2044-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2044-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2045-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2045-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2045-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2045-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2045-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2045-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2045-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2045-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2045-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2045-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2045-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2045-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2046-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2046-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2046-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2046-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2046-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2046-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2046-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2046-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2046-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2046-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2046-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2046-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2047-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2047-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2047-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2047-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2047-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2047-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2047-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2047-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2047-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2047-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2047-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2047-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2048-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2048-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2048-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2048-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2048-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2048-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2048-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2048-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2048-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2048-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2048-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2048-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2049-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2049-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2049-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2049-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2049-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2049-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2049-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2049-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2049-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2049-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2049-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2049-12-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2050-1-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2050-2-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2050-3-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2050-4-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2050-5-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2050-6-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2050-7-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2050-8-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2050-9-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2050-10-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2050-11-1')\g
INSERT INTO SpsMonths (first_day) VALUES ('2050-12-1')\g

/*
 * Newsletters -- automatically created mail messages
 */

CREATE TABLE SpsNewsletters
(
code                VARCHAR(100) NOT NULL,
pk                  VARCHAR(100) NOT NULL,
UNIQUE(code, pk),
msg_id              VARCHAR(255) NOT NULL,
UNIQUE(msg_id)
)\g

/*************************************************************************
 * Go-Codes
 *************************************************************************/

CREATE TABLE SpsGo
(
go_code              VARCHAR(255) PRIMARY KEY,
go_url               VARCHAR(255) NOT NULL,
go_publication       VARCHAR(255),
go_issue             VARCHAR(255),
go_name              VARCHAR(255),
go_description       TEXT
)\g

CREATE TABLE SpsGoLog
(
go_id               INTEGER PRIMARY KEY,
go_code             VARCHAR(255),
go_date             DATE
)\g

/**********************************************************
 * Global Variables
 **********************************************************/
/*
 * Global variables available throughout a Web site
 */

CREATE TABLE SpsGlobalVariables
(
variable_code        VARCHAR(200),
variable_name        VARCHAR(200),
variable_value       VARCHAR(255),
variable_comment     VARCHAR(255),
UNIQUE(variable_code, variable_name)
)\g


/**********************************************************
 * Site Map
 **********************************************************/
/*
 * Schema for the sitemap plugin module
 */

CREATE TABLE SpsSiteMap
(
section_id                      INTEGER PRIMARY KEY,
code                            VARCHAR(255),
parent_section_id               INTEGER,
section_name                    VARCHAR(255) NOT NULL,
section_filename                VARCHAR(255) NOT NULL,
section_sequence                NUMERIC(10,2),
section_files                   TEXT,
section_notes                   TEXT,
section_is_divider              INTEGER,
section_is_hidden               INTEGER,
section_is_link                 INTEGER,
sitemap_img_closed              VARCHAR(255),
sitemap_img_open                VARCHAR(255),
sitemap_img_active              VARCHAR(255),
sitemap_code                    VARCHAR(255),
INDEX(sitemap_code)
)\g

/*****************************************
 * Conferences
 ******************************************/

CREATE TABLE SpsConferences
(
conference_id                       INTEGER PRIMARY KEY,
conference_title                    VARCHAR(255) NOT NULL,
conference_start_date               DATE,
conference_end_date                69.36.182.9769.36.182.97 DATE,
conference_registration_opens_date  DATE,
conference_registration_closes_date DATE,
conference_short_description        TEXT,
conference_is_hidden                INTEGER
)\g

CREATE TABLE SpsConferenceRegistrants
(
conference_id                  INTEGER NOT NULL,
user_id                        INTEGER NOT NULL,
PRIMARY KEY (conference_id, user_id),
status                         VARCHAR(255), /* REGISTERED, CANCELED, ATTENDED, CONFIRMED */
reminder_status                VARCHAR(255), /* NONE, PENDING, SENT */
notes                          TEXT,
registered_at                  DATETIME
);

/*************************************************************************
 * Saved Searches
 *************************************************************************/

CREATE TABLE SpsSavedSearches
(
search_id                     INTEGER PRIMARY KEY,
table_name                    VARCHAR(255),
search_name                   VARCHAR(255),
search_body                   LONGTEXT
)\g

/*************************************************************************
 * Recent
 *************************************************************************/

CREATE TABLE SpsRecent
(
recent_id                   INTEGER PRIMARY KEY,
user_id                     INTEGER,
INDEX(user_id),
table_name                  VARCHAR(255),
INDEX(table_name),
record_id                   INTEGER,
INDEX(record_id),
recent_date                 DATETIME,
INDEX(recent_date)
);

/*************************************************************************
 * Blogs
 *************************************************************************/

CREATE TABLE SpsBlogs
(
blog_id             INTEGER PRIMARY KEY,
blog_name           VARCHAR(255),
INDEX(blog_name),
blog_home_headline  VARCHAR(255),
blog_short_intro    TEXT,
blog_long_intro     TEXT,
blog_posts_per_page INTEGER
);

CREATE TABLE SpsComments
(
comment_id               INTEGER PRIMARY KEY,
object_type              VARCHAR(255),
INDEX(object_type),
object_id                VARCHAR(255),
INDEX(object_id),
comment_title            VARCHAR(255),
comment_date             DATETIME,
INDEX(comment_date),
comment_body             TEXT,
comment_author_id        INTEGER,
INDEX(comment_author_id),
comment_status           VARCHAR(255),
INDEX(comment_status),
comment_hidden           INTEGER,
INDEX(comment_hidden)
);

/*************************************************************************
 * Images and Albums
 *************************************************************************/

CREATE TABLE SpsImages
(
image_id                    INTEGER PRIMARY KEY,
image_name                  VARCHAR(255),
INDEX(image_name),
image_caption               VARCHAR(255),
INDEX(image_caption),
image_credit                VARCHAR(255),
INDEX(image_credit),
image_date                  DATETIME,
INDEX(image_date),
image_sm                    VARCHAR(255),
image_md                    VARCHAR(255),
image_lg                    VARCHAR(255),
image_xl                    VARCHAR(255)
);

CREATE TABLE SpsAlbums
(
album_id                     INTEGER PRIMARY KEY,
album_name                   VARCHAR(255),
INDEX(album_name),
album_short_description      TEXT,
album_long_description       TEXT,
album_date                   DATETIME
);

CREATE TABLE SpsImageAlbums
(
image_id         INTEGER NOT NULL,
album_id         INTEGER NOT NULL,
sequence         NUMERIC(10,2),
PRIMARY KEY (image_id, album_id)
)\g
