Basic implementation event signup

This commit is contained in:
2024-05-27 16:59:30 +02:00
parent a66f2d2422
commit a69d83bc0a
321 changed files with 138376 additions and 644 deletions

View File

@ -0,0 +1,28 @@
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
CREATE TABLE `%tablename%` (
`id` int NOT NULL AUTO_INCREMENT,
`eventId` int NOT NULL,
`group_name` varchar(1024) NOT NULL,
`max_participants` int NOT NULL,
`amount_reduced` decimal(8,2) DEFAULT NULL,
`amount_default` decimal(8,2) DEFAULT NULL,
`amount_social` decimal(8,2) DEFAULT NULL,
PRIMARY KEY (id)
) %charset%;
ALTER TABLE `%tablename%`
ADD PRIMARY KEY (`id`),
ADD KEY `event_group` (`eventId`);
ALTER TABLE `%tablename%`
MODIFY `id` int NOT NULL AUTO_INCREMENT;
ALTER TABLE `%tablename%`
ADD CONSTRAINT `event_group` FOREIGN KEY (`eventId`) REFERENCES `%prefix%kompass_veranstaltungen_index` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT;
COMMIT;

View File

@ -0,0 +1,29 @@
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
CREATE TABLE `%tablename%` (
`id` int NOT NULL AUTO_INCREMENT,
`event_name` varchar(1024) NOT NULL,
`archived` tinyint NOT NULL DEFAULT '0',
`signup_allowed` tinyint NOT NULL DEFAULT '0',
`startdatum` date DEFAULT NULL,
`enddatum` date DEFAULT NULL,
`amount_reduced` decimal(8,2) NOT NULL,
`amount_default` decimal(8,2) NOT NULL,
`amount_social` decimal(8,2) NOT NULL,
`max_participants` INT NOT NULL,
`max_volunteers` INT NOT NULL,
`contributing_tribes` TEXT NOT NULL AFTER
PRIMARY KEY (id)
) %charset%;
ALTER TABLE `%tablename%`
ADD PRIMARY KEY (`id`);
ALTER TABLE `%tablename%`
MODIFY `id` int NOT NULL AUTO_INCREMENT;
COMMIT;

View File

@ -0,0 +1,55 @@
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
CREATE TABLE `%tablename%` (
`id` int NOT NULL AUTO_INCREMENT,
`gruppe_id` int NOT NULL,
`teilnahme` ENUM('participant','volunteer','other','') NOT NULL,
`vorname` varchar(128) NOT NULL,
`nachname` varchar(128) NOT NULL,
`pfadiname` varchar(256) DEFAULT NULL,
`stamm` varchar(256) DEFAULT NULL,
`geburtsdatum` date DEFAULT NULL,
`ansprechpartner` varchar(256) DEFAULT NULL,
`strasse` varchar(128) DEFAULT NULL,
`hausnummer` varchar(8) DEFAULT NULL,
`plz` varchar(5) DEFAULT NULL,
`ort` varchar(128) DEFAULT NULL,
`email_1` varchar(512) NOT NULL,
`email_2` varchar(512) DEFAULT NULL,
`telefon_1` varchar(16) NOT NULL,
`telefon_2` varchar(16) DEFAULT NULL,
`badeerlaubnis` enum('complete','partial','none','') NOT NULL DEFAULT 'none',
`allergien` varchar(2048) NOT NULL,
`medikamente` varchar(2048) NOT NULL,
`essgewohnheit` enum('all','vegetarisch','vegan') NOT NULL DEFAULT 'vegetarisch',
`foto_socialmedia` tinyint NOT NULL DEFAULT '0',
`foto_print` tinyint NOT NULL DEFAULT '0',
`foto_webseite` tinyint NOT NULL DEFAULT '0',
`foto_partner` tinyint NOT NULL DEFAULT '0',
`foto_intern` tinyint NOT NULL DEFAULT '0',
`anmerkungen` varchar(2048) NOT NULL,
`beitrag` decimal(8,2) NOT NULL DEFAULT '0',
`beitrag_bezahlt` decimal(8,2) NOT NULL DEFAULT '0',
`anreise` date DEFAULT NULL,
`anreise_essen` int NOT NULL,
`abreise` date DEFAULT NULL,
`abreise_essen` int NOT NULL,
`anmeldedatum` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id)
) %charset%;
ALTER TABLE `%tablename%`
ADD PRIMARY KEY (`id`),
ADD KEY `event_gruppe` (`gruppe_id`);
ALTER TABLE `%tablename%`
MODIFY `id` int NOT NULL AUTO_INCREMENT;
ALTER TABLE `%tablename%`
ADD CONSTRAINT `event_gruppe` FOREIGN KEY (`gruppe_id`) REFERENCES `%prefix%kompass_veranstaltungen_gruppen` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;