[fix] adding csrf table at INSTALL time, not only at UPGRADE time
This commit is contained in:
parent
22d492739c
commit
9d23336e0c
|
@ -749,3 +749,13 @@ DELETE FROM alternc_status WHERE name='alternc_version';
|
||||||
INSERT INTO alternc_status SET name='alternc_version',value='3.4.7.php';
|
INSERT INTO alternc_status SET name='alternc_version',value='3.4.7.php';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `csrf` (
|
||||||
|
`cookie` char(32) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
|
||||||
|
`token` char(32) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
|
||||||
|
`created` datetime NOT NULL,
|
||||||
|
`used` tinyint(3) unsigned NOT NULL DEFAULT '0'
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='csrf tokens for AlternC forms';
|
||||||
|
|
||||||
|
ALTER TABLE `csrf` ADD PRIMARY KEY (`cookie`,`token`), ADD KEY `created` (`created`);
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,6 @@ ALTER TABLE `tld` ENGINE InnoDB;
|
||||||
ALTER TABLE `variable` ENGINE InnoDB;
|
ALTER TABLE `variable` ENGINE InnoDB;
|
||||||
ALTER TABLE `vm_history` ENGINE InnoDB;
|
ALTER TABLE `vm_history` ENGINE InnoDB;
|
||||||
|
|
||||||
-- Should lthe default_subdomains table already exists, prevent the following INSERT INTO to double the entries
|
-- If the default_subdomains table already exists, prevent the following INSERT INTO to double the entries
|
||||||
ALTER TABLE `default_subdomains` ADD UNIQUE KEY `unique_row` (`sub`,`domain_type`,`domain_type_parameter`,`concerned`);
|
ALTER TABLE `default_subdomains` ADD UNIQUE KEY `unique_row` (`sub`,`domain_type`,`domain_type_parameter`,`concerned`);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue