Skip to content
Snippets Groups Projects
Commit 65b700c5 authored by Christoph Zysik's avatar Christoph Zysik
Browse files

changed gebuchte_werbung sql structure

parent 34af6b1b
Branches
No related merge requests found
......@@ -136,21 +136,26 @@ CREATE TABLE IF NOT EXISTS `vms_fb_blacklist` (
`werbeart` varchar(255) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `vms_gebuchte_werbung` (
`uid` int(7) NOT NULL DEFAULT '0',
`tan` varchar(32) NOT NULL DEFAULT '',
`kid` int(11) NOT NULL DEFAULT '0',
`ziel` varchar(250) NOT NULL DEFAULT '',
`banner` varchar(250) NOT NULL DEFAULT '',
CREATE TABLE `vms_gebuchte_werbung` (
`id` bigint(1) UNSIGNED NOT NULL,
`uid` int(1) UNSIGNED NOT NULL DEFAULT '0',
`tan` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`kid` int(1) UNSIGNED NOT NULL DEFAULT '0',
`ziel` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`banner` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`verdienst` double(10,2) NOT NULL DEFAULT '0.00',
`preis` double(10,2) NOT NULL DEFAULT '0.00',
`aufendhalt` int(11) NOT NULL DEFAULT '0',
`menge` int(11) NOT NULL DEFAULT '0',
`reload` int(11) NOT NULL DEFAULT '0',
`aufendhalt` int(1) UNSIGNED NOT NULL DEFAULT '0',
`menge` int(1) UNSIGNED NOT NULL DEFAULT '0',
`reload` int(1) UNSIGNED NOT NULL DEFAULT '0',
`sponsor` varchar(25) NOT NULL DEFAULT '',
`werbeart` varchar(50) NOT NULL DEFAULT '',
`status` tinyint(1) NOT NULL DEFAULT '1'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
`addata` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`status` tinyint(1) NOT NULL DEFAULT '1',
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`expires` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `vms_geburtstag` (
`geb_mail` int(11) NOT NULL,
......@@ -597,7 +602,10 @@ ALTER TABLE `vms_fb_blacklist`
ADD UNIQUE KEY `sponsor` (`sponsor`,`kid`,`werbeart`);
ALTER TABLE `vms_gebuchte_werbung`
ADD KEY `klick4` (`werbeart`,`menge`,`status`,`verdienst`,`sponsor`), ADD KEY `crons` (`sponsor`,`werbeart`,`status`);
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `tan` (`tan`),
ADD KEY `klick4` (`werbeart`,`menge`,`status`,`verdienst`,`sponsor`),
ADD KEY `crons` (`sponsor`,`werbeart`,`status`);
ALTER TABLE `vms_interface`
ADD KEY `interface` (`interface`);
......@@ -695,4 +703,10 @@ MODIFY `id` tinyint(1) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=30;
ALTER TABLE `vms_rallyorte`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=8;
ALTER TABLE `vms_gebuchte_werbung` ADD `id` BIGINT(1) UNSIGNED NOT NULL AUTO_INCREMENT FIRST, ADD PRIMARY KEY (`id`);
ALTER TABLE `vms_gebuchte_werbung`
MODIFY `id` bigint(1) UNSIGNED NOT NULL AUTO_INCREMENT;
DELIMITER $$
CREATE TRIGGER `campaign_update` BEFORE UPDATE ON `vms_gebuchte_werbung` FOR EACH ROW SET NEW.`modified` = CURRENT_TIMESTAMP
$$
DELIMITER ;
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment