initial work on early access codes

This commit is contained in:
2017-06-26 21:55:10 +10:00
parent 3af311609c
commit e332a35fa0
7 changed files with 87 additions and 44 deletions

View File

@@ -674,7 +674,8 @@ function booking_schema() {
//identifiers
'nid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
'booking_eventid' => array('type' => 'int', 'length' => '11', 'default' => 0, 'not null' => FALSE),
'booking_tempid' => array('type' => 'varchar', 'length' => '40', 'not null' => FALSE),
'booking_tempid' => array('type' => 'varchar', 'length' => '40', 'not null' => FALSE),
'booking_earlyaccess_code_id' => array('type' => 'int', 'length' => '11', 'default' => 0, 'not null' => FALSE),
'booking_timestamp' => array('type' => 'int', 'not null' => TRUE, 'disp-width' => '11'),
'booking_firstname' => array('type' => 'varchar', 'length' => '50', 'not null' => TRUE),
'booking_lastname' => array('type' => 'varchar', 'length' => '50', 'not null' => TRUE),
@@ -988,5 +989,16 @@ function booking_schema() {
'primary key' => array('mid'),
);
//This lists all the early registration access codes
$schema['booking_regn_earlyaccess_codes'] = array(
'fields' => array(
'cid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
'booking_eventid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
'booking_regn_earlyaccess_code' => array('type' => 'varchar', 'length' => '500', 'not null' => FALSE),
'booking_regn_earlyaccess_code_avail' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE),
),
'primary key' => array('cid'),
);
return $schema;
}