/*
* General Database Organization
* -----------------------------
- *
+ *
* management - General options and configuration - Site manager access only
- *
- * misc - Misc settings and text - Site owner may update
- *
+ *
+ * misc - Misc settings and text - Site owner may update
+ *
* Magic Forms Tables
* magicforms - Forms
- * --> Event, Registration, Rate Class, Account, Registrant
+ * --> Event, Registration, Rate Class, Account, Registrant
* mf_data - Data submitted to a form
- * --> Submission, Event Registration, Rate Class selected, Account, Registrant
+ * --> Submission, Event Registration, Rate Class selected, Account, Registrant
* mf_temp_file - Temporary file meta-data
- *
+ *
* added_info_fields - Additional fields
- * added_info_data - Submitted additional field data
+ * added_info_data - Submitted additional field data
* --> added_info_fields
- *
+ *
* payment codes - Promotional payment codes - Used with various things
* --> Event, Submission, Event Registration, Event Registrant, Account or global
- *
+ *
* reg_event - Describes registration for that event
- * reg_time - One record for each date/time this event has people registered - Primarily tracks attendee counts and charge totals
+ * reg_time - One record for each date/time this event has people registered - Primarily tracks attendee counts and charge totals
* reg_class - Type of registration for this event (one or more)
* reg_rates - Date range / rate for a reg class (one or more)
- *
+ *
* reg_account - Describes someone who submits / pays for a registration
* Make these two things the same table....
* registrant - A person who is registered for an event
- *
+ *
* reg_request - Information on a specific request for registrations
* reg_request_event - Event selected (one or more)
* reg_request_class - Class of registration (one or more)
* reg_request_rate - Specific registration date/rate (one or more)
* reg_request_registrant - Registrant (one or more)
- *
- *
+ *
+ *
* Overall Flow
* ------------
*
reg_authorize_net_login TINYTEXT NULL,
reg_authorize_net_key TINYTEXT NULL,
reg_authorize_net_test TINYINT NULL, -- Authorize.net test mode - List - see proc_test_mode in plugin.ini
- reg_authorize_net_conf BOOLEAN NULL, -- Flag to send payment confirmation Email from Authorize.net
+ reg_authorize_net_conf BOOLEAN NULL, -- Flag to send payment confirmation Email from Authorize.net
reg_authorize_net_merchant_email TINYTEXT NULL, -- E-Mail Authorize.net will send copy of confirmation E-Mail
-- Merchant Solutions Credentials
reg_merchant_solutions_acctid TINYTEXT NULL, -- Merchant Solutions credentials
reg_merchant_solutions_merchantpin TINYTEXT NULL,
reg_merchant_solutions_test TINYINT NULL, -- Merchant Solutions test mode - List - see proc_test_mode in plugin.ini
- -- Billing settings
+ -- Billing settings
reg_full_billing_info BOOLEAN NULL, -- Always request full billing information in checkout page regardless of the following settings
reg_bill_info_req_no_charge SMALLINT NULL, -- Bitmap of fields to use in checkout for these types of payments - See billing_field in plugin.conf
- reg_bill_info_req_comp_code SMALLINT NULL,
- reg_bill_info_req_cash SMALLINT NULL,
- reg_bill_info_req_check SMALLINT NULL,
- reg_bill_info_req_credit_card SMALLINT NULL,
- reg_bill_info_req_merchant_call SMALLINT NULL,
+ reg_bill_info_req_comp_code SMALLINT NULL,
+ reg_bill_info_req_cash SMALLINT NULL,
+ reg_bill_info_req_check SMALLINT NULL,
+ reg_bill_info_req_credit_card SMALLINT NULL,
+ reg_bill_info_req_merchant_call SMALLINT NULL,
-- Misc Options
reg_medical_info BOOLEAN NULL, -- This site can ask for "Medical Info" - set in main category of an event
PRIMARY KEY (id)
-- Related to the registration submission or specific event registration
CREATE TABLE {prefix}added_info_fields (
id INT NOT NULL AUTO_INCREMENT,
- ref_type TINYINT NULL, -- See data_ref_type table in plugin.ini
+ ref_type TINYINT NULL, -- See data_ref_type table in plugin.ini
ref_dest INT NULL, -- Pointer to the specific entity of ref_type - (not user submitted data record)
name TINYTEXT NULL, -- Displayed field prompt - also used on retrieval of data
description TINYTEXT NULL, -- Description of field - possibly to display to user
added_info_field INT NULL, -- Pointer to added_info_field table
ref_type TINYINT NULL, -- See data ref_type table in plugin.ini
ref_dest INT NULL, -- Pointer to specific entryt of the correct type (user submitted data record)
- field_value TINYTEXT NULL,
+ field_value TINYTEXT NULL,
PRIMARY KEY (id),
INDEX (ref_dest)
);
code_type TINYINT NULL, -- Type of adjustment - Free only to start with - See pay_code_type in plugin.ini
ref_type TINYINT NULL, -- See payment_ref_type in plugin.ini
ref_dest INT NULL, -- Pointer to the specific entity of ref_type
- code TINYTEXT NULL, -- Text code user must enter to use
+ code TINYTEXT NULL, -- Text code user must enter to use
amount FLOAT, -- Amount of discount if not type "Free" - Either $ amount or percent
- descr TEXT NULL,
+ descr TEXT NULL,
PRIMARY KEY (id),
INDEX (ref_dest),
INDEX (code(10))
notify_email TINYTEXT NULL, -- E-Mail addresses to recieve notification of a registration other than org_internal_email in management, comma separated
admin_active BOOLEAN NULL, -- Active flag for admin from Events - If logged in Admin user for this event and this is true then admin user may enter registrations even if active is off.
active BOOLEAN NULL, -- Active flag to indicate that this event is available for registrations
- time_specific BOOLEAN NULL, -- Registration for this event is not date/time specific. Can attend any date/time of event.
+ time_specific BOOLEAN NULL, -- Registration for this event is not date/time specific. Can attend any date/time of event.
attendees BOOLEAN NULL, -- Registration requires attendees - Otherwise the person submitting the registration is the registrant
attendee_max MEDIUMINT NULL, -- Attendee limit - 0 = unlimited
attendee_max_per_reg TINYINT NULL, -- Maximum attendees per registration submission - 0 = unlimited
----
-- Registration Event Time - Information and summary data for a specific event instance (relates to a perticular time record in events)
--- A pseudo entry is created if registration is not date/time sensitive for this event. The pseudo entry does not point to an event time.
--- These are created the first time a person tries to register for an event instance (time)
+-- A pseudo entry is created if registration is not date/time sensitive for this event. The pseudo entry does not point to an event time.
+-- These are created the first time a person tries to register for an event instance (time)
-- One or more for each event
CREATE TABLE {prefix}reg_time (
id INT NOT NULL AUTO_INCREMENT,
end_datetime DATETIME NULL, -- Date and time when event instance ends - Informational
all_day BOOLEAN NULL, -- All Day flag - Informational
attendees BOOLEAN NULL, -- Flag if tracking attendees or if only one per registration submission (registers account submitting) - get from reg_event
- attendee_max MEDIUMINT NULL, -- Attendee count limit - 0 = unlimited - get from reg_event record
+ attendee_max MEDIUMINT NULL, -- Attendee count limit - 0 = unlimited - get from reg_event record
attendee_count MEDIUMINT NULL, -- Current attendee count - calculated on the fly and stored here for reference
- attendees_pending MEDIUMINT NULL, -- Current number of attendees for this time in active pending carts (Not checked out and attendees slots held)
+ attendees_pending MEDIUMINT NULL, -- Current number of attendees for this time in active pending carts (Not checked out and attendees slots held)
attendees_available MEDIUMINT NULL, -- Currently available attendee count (limit - current - pending)
total_base_charge DOUBLE NULL, -- Total base charges
total_per_attendee DOUBLE NULL, -- Total per-attendee charges
----
-- Pending Attendees - In carts but not checked out
--- Attendee counts may be held for a particular reg_time entry for carts that have not been checked out
+-- Attendee counts may be held for a particular reg_time entry for carts that have not been checked out
-- These are held for reg_event reg_hold_minutes, afterwhich they are timed out and removed from this table
-- Cart entries are given the ID's for these entries when a hold is requested, if the entry is gone, the hold has expired
CREATE TABLE {prefix}reg_time_pending (
id INT NOT NULL AUTO_INCREMENT,
reg_event INT NULL, -- Pointer to reg_event table
reg_time INT NULL, -- ID of time record
- expire_time DATETIME NULL, -- Time at which this hold expires
+ expire_time DATETIME NULL, -- Time at which this hold expires
PRIMARY KEY (id),
INDEX (reg_event),
- INDEX (event_time)
+ INDEX (reg_time)
);
----
INDEX (state(5)),
INDEX (zip(5)),
INDEX (email(10)),
- INDEX (contact_id)
+ INDEX (contact_id)
);
----
event_name TINYTEXT NULL, -- Name of Event so it will always be in the cart data
reg_time INT NULL, -- Pointer to times table entry in Events add-on
event_datetime DATETIME NULL, -- Date and time of event time selected so it will always be in the cart
- total_charge FLOAT, -- Last calculated total of all charges for registration to this event for all registrants
+ total_charge FLOAT, -- Last calculated total of all charges for registration to this event for all registrants
mf_data TEXT NULL, -- Any MagicForm data associated with requested event
notes TEXT NULL, -- System operator's notes for this registration request
PRIMARY KEY (id),
reg_request_event INT NULL, -- Pointer to reg_request_event table entry
class INT NULL, -- Pointer to event reg_class table - False (0) if registration class no longer exits
class_name TINYTEXT NULL, -- Name of event class at the time selected
- total_class_charge FLOAT, -- Last calculated total of all charges for this registration class for this request
+ total_class_charge FLOAT, -- Last calculated total of all charges for this registration class for this request
mf_data TEXT NULL, -- Any MagicForm data associated with registrant
notes TEXT NULL, -- System operator's notes for this registration request
PRIMARY KEY (id),
reg_request_event INT NULL, -- Pointer to reg_request_event table entry
reg_request_class INT NULL, -- Pointer to reg_request_class table entry
reg_request_rate INT NULL, -- Pointer to reg_request_rate table entry
- reg_request_hold BOOLEAN NULL, -- Registrant hold active - Registrant slots held certain time since last cart access - After this the slot needs to be updated if available
+ reg_request_hold BOOLEAN NULL, -- Registrant hold active - Registrant slots held certain time since last cart access - After this the slot needs to be updated if available
reg_request_hold_not_available BOOLEAN NULL, -- No registrant slot available for this registrant - Unable to get hold
fname TINYTEXT NULL, -- First name of registrant at the time of selection
lname TINYTEXT NULL, -- Last name of registrant at the time of selection
'', -- reg_authorize_net_merchant_email,
'', -- reg_merchant_solutions_acctid,
'', -- reg_merchant_solutions_merchantpin,
- 1, -- reg_merchant_solutions_test,
+ 1, -- reg_merchant_solutions_test,
true, -- reg_full_billing_info,
0, -- reg_bill_info_req_no_charge,
0, -- reg_bill_info_req_comp_code,
'Register for Event', -- reg_term_registration_button
'Contact Information' -- reg_term_contact_information
);
-
+
----
-- Insert into misc table