--- Gaslight Media Members Database
+-- Gaslight Media Members Database
-- File Created: 12/09/14 15:27:15
-- Database Version: 1.1.12
-- Database Creation Script
---
+--
-- To permit each query below to be executed separately,
-- all queries must be separated by a line with four dashes
---
+--
-- **** BE SURE TO ALSO UPDATE drop_database_Vxxx.sql FILE WHEN CHANGING TABLES ****
---
+--
-- Amenities
CREATE TABLE {prefix}amenities (
name TINYTEXT NULL, -- Name of amenity
descr TEXT NULL, -- Description of amenity
short_descr TINYTEXT NULL, -- Short description of amenity
- ref_type INT NULL, -- Type of entity these amenitites are associated with - see plugin.ini ref_type tables
+ ref_type INT NULL, -- Type of entity these amenities are associated with - see plugin.ini ref_type tables
uses_value BOOLEAN NULL, -- Flag indicating whether the amenity requires a quantity number
PRIMARY KEY (id),
INDEX(name(20))
CREATE TABLE {prefix}amenity_ref (
id INT NOT NULL AUTO_INCREMENT,
amenity INT NULL, -- Pointer to amenity in amenities table
- ref_type INT NULL, -- Copy of ref_type from matching ameities table entry - to simplify searches
+ ref_type INT NULL, -- Copy of ref_type from matching amenities table entry - to simplify searches
ref_dest INT NULL, -- Pointer to the specific entity of type ref_type
- amenity_value TINYTEXT NULL, -- Quanity if amenity uses values
+ amenity_value TINYTEXT NULL, -- Quantity if amenity uses values
PRIMARY KEY (id),
INDEX(ref_type),
INDEX(ref_dest)
id INT NOT NULL AUTO_INCREMENT,
name TINYTEXT NULL, -- Name of this category
descr TEXT NULL, -- Description of this category
- short_descr TINYTEXT NULL, -- Short description of this category
+ short_descr TINYTEXT NULL, -- Short description of this category
parent INT NULL, -- Pointer to parent category in this table - if there is one
PRIMARY KEY (id)
);
----
--- Mapping of categories to speific member information records
+-- Mapping of categories to specific member information records
CREATE TABLE {prefix}category_member_info (
id INT NOT NULL AUTO_INCREMENT,
category INT NULL, -- Pointer to category in categories table
- member_info INT NULL, -- Pointer to member infomation record
+ member_info INT NULL, -- Pointer to member information record
PRIMARY KEY (id),
CONSTRAINT {prefix}categories_fk_1
FOREIGN KEY (category)
-- Cities
CREATE TABLE {prefix}cities (
- id INT NOT NULL AUTO_INCREMENT,
+ id INT NOT NULL AUTO_INCREMENT,
name TINYTEXT NULL, -- Name of city
PRIMARY KEY (id)
);
name TINYTEXT NULL, -- Original name of the file - might be URL if copied via HTTP
status TINYINT(1) NULL, -- Display/Use status - See plugin.ini status table
file_name TINYTEXT NULL, -- Stored file name for the file
- descr TEXT NULL, -- Description
+ descr TEXT NULL, -- Description
position INT NULL, -- Numeric position for sequence of display
ref_type INT NULL, -- Type of entity this image is associated with
ref_dest INT NULL, -- Pointer to the specific entity of ref_type this image is associated with
selected BOOLEAN NULL, -- A single special image in the current gallery for this entity
featured BOOLEAN null, -- Image is a member of a group of featured images
file_name TINYTEXT NULL, -- Stored file name for the image
- descr TEXT NULL, -- Description
+ descr TEXT NULL, -- Description
caption TINYTEXT NULL, -- Caption for the image
position INT NULL, -- Numeric position for sequence of display
ref_type INT NULL, -- Type of entity this image is associated with
----
--- Member information version record - May be multiples per member - Only one with stauts "Active" for a distinct date range
+-- Member information version record - May be multiples per member - Only one with status "Active" for a distinct date range
CREATE TABLE {prefix}member_info (
id INT NOT NULL AUTO_INCREMENT,
member INT NULL, -- Pointer to member record in table members
member_name TINYTEXT NULL, -- Copy of member name from members table entry for fast reference
status INT NULL, -- Status of this member information record - See plugin.ini status table
- reference_name TINYTEXT NULL, -- Refernce name for this member information record - Not displayed on front-end
+ reference_name TINYTEXT NULL, -- Reference name for this member information record - Not displayed on front-end
descr TEXT NULL, -- Description
short_descr TEXT NULL, -- Short description
addr1 TINYTEXT NULL, -- Main member location address line 1
logo TINYTEXT NULL, -- Member logo
cc_type INT NULL, -- Bitmap of credit card types accepted - See credit_card array in plugin.ini
video_url TINYTEXT NULL, -- Video URL
- video_file TINYTEXT NULL, -- Video File Name
+ video_file TINYTEXT NULL, -- Video File Name
video_title TINYTEXT NULL, -- Video Title
video_descr TEXT NULL, -- Video Description
video_type INT NULL, -- Video Type - See plugin.ini video type table.
----
-- Member type - Can be used to assign members to different "classes" of membership (i.e. Full, Associate, Premium)
--- Mostly for internal use by the member organization, but could be displayed - Consider a short_description if they are.
+-- Mostly for internal use by the member organization, but could be displayed - Consider a short_description if they are.
CREATE TABLE {prefix}member_type (
id INT NOT NULL AUTO_INCREMENT,
name TINYTEXT NULL, -- Name of member type
CREATE TABLE {prefix}regions (
id INT NOT NULL AUTO_INCREMENT,
name TINYTEXT NULL, -- Name of region
- descr TEXT NULL, -- Descrption of region
- short_descr TINYTEXT NULL, -- Short descroption of region
+ descr TEXT NULL, -- Description of region
+ short_descr TINYTEXT NULL, -- Short description of region
PRIMARY KEY (id)
);
----
-- Terms used in site modifiable on Management page in admin - Only 1 entry in this table
--- Tems in this table should be all self-explanatory
+-- Terms in this table should be all self-explanatory
CREATE TABLE {prefix}settings_terms (
id INT NOT NULL AUTO_INCREMENT,
term_admin_menu_members TINYTEXT NULL,
INSERT INTO {prefix}settings_terms
(
id,
- term_admin_menu_members,
- term_admin_menu_member_list,
- term_admin_menu_member,
- term_admin_menu_configure,
- term_admin_menu_settings,
- term_admin_menu_shortcodes,
- term_admin_menu_members_dashboard,
- term_admin_menu_members_list,
- term_admin_menu_members_reports,
+ term_admin_menu_members,
+ term_admin_menu_member_list,
+ term_admin_menu_member,
+ term_admin_menu_configure,
+ term_admin_menu_settings,
+ term_admin_menu_shortcodes,
+ term_admin_menu_members_dashboard,
+ term_admin_menu_members_list,
+ term_admin_menu_members_reports,
term_admin_menu_member_dashboard,
term_admin_menu_member_info,
- term_admin_menu_member_locations,
- term_admin_menu_member_facilities,
- term_admin_menu_member_attractions,
- term_admin_menu_member_contacts,
- term_admin_menu_configure_member_types,
- term_admin_menu_configure_member_cats,
- term_admin_menu_configure_accom_types,
- term_admin_menu_configure_amenities,
- term_admin_menu_configure_cities,
- term_admin_menu_configure_regions,
- term_admin_menu_settings_general,
- term_admin_menu_settings_terms,
- term_admin_menu_settings_development,
- term_member,
- term_member_cap,
- term_member_plur,
- term_member_plur_cap,
- term_location,
+ term_admin_menu_member_locations,
+ term_admin_menu_member_facilities,
+ term_admin_menu_member_attractions,
+ term_admin_menu_member_contacts,
+ term_admin_menu_configure_member_types,
+ term_admin_menu_configure_member_cats,
+ term_admin_menu_configure_accom_types,
+ term_admin_menu_configure_amenities,
+ term_admin_menu_configure_cities,
+ term_admin_menu_configure_regions,
+ term_admin_menu_settings_general,
+ term_admin_menu_settings_terms,
+ term_admin_menu_settings_development,
+ term_member,
+ term_member_cap,
+ term_member_plur,
+ term_member_plur_cap,
+ term_location,
term_location_cap,
- term_location_plur,
- term_location_plur_cap,
- term_facility,
- term_facility_cap,
- term_facility_plur,
- term_facility_plur_cap,
- term_attraction,
- term_attraction_cap,
- term_attraction_plur,
- term_attraction_plur_cap,
- term_contact,
- term_contact_cap,
- term_contact_plur,
- term_contact_plur_cap
+ term_location_plur,
+ term_location_plur_cap,
+ term_facility,
+ term_facility_cap,
+ term_facility_plur,
+ term_facility_plur_cap,
+ term_attraction,
+ term_attraction_cap,
+ term_attraction_plur,
+ term_attraction_plur_cap,
+ term_contact,
+ term_contact_cap,
+ term_contact_plur,
+ term_contact_plur_cap
)
VALUES
(
1,
- 'Members',
- 'Member',
- 'Member',
- 'Configure',
- 'Management',
- 'Shortcodes',
- 'Dashboard',
- 'Member List',
- 'Reports',
+ 'Members',
+ 'Member',
+ 'Member',
+ 'Configure',
+ 'Management',
+ 'Shortcodes',
+ 'Dashboard',
+ 'Member List',
+ 'Reports',
'Member Dashboard',
- 'Member Info',
- 'Locations',
- 'Facilities',
- 'Attractions',
- 'Contacts',
- 'Member Types',
- 'Member Categories',
+ 'Member Info',
+ 'Locations',
+ 'Facilities',
+ 'Attractions',
+ 'Contacts',
+ 'Member Types',
+ 'Member Categories',
'Accommodation Types',
- 'Amenities',
- 'Cities',
- 'Regions',
- 'General Settings',
- 'Terms & Phrases',
- 'Development',
- 'member',
- 'Member',
- 'members',
- 'Members',
- 'location',
- 'Location',
- 'locations',
- 'Locations',
- 'facility',
- 'Facility',
- 'facilities',
- 'Facilities',
- 'attraction',
- 'Attraction',
- 'attractions',
- 'Attractions',
- 'contact',
- 'Contact',
- 'contacts',
+ 'Amenities',
+ 'Cities',
+ 'Regions',
+ 'General Settings',
+ 'Terms & Phrases',
+ 'Development',
+ 'member',
+ 'Member',
+ 'members',
+ 'Members',
+ 'location',
+ 'Location',
+ 'locations',
+ 'Locations',
+ 'facility',
+ 'Facility',
+ 'facilities',
+ 'Facilities',
+ 'attraction',
+ 'Attraction',
+ 'attractions',
+ 'Attractions',
+ 'contact',
+ 'Contact',
+ 'contacts',
'Contacts'
)
;
-- Default Theme Settings entry
INSERT INTO {prefix}settings_theme
(
- id
+ id
)
VALUES
(