Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 5dee536

Browse files
author
Jamie Snape
committed
Small tweaks to some SQL scripts
1 parent 108fd90 commit 5dee536

File tree

19 files changed

+18
-24
lines changed

19 files changed

+18
-24
lines changed

core/database/mysql/3.0.1.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,4 +404,4 @@ CREATE TABLE IF NOT EXISTS `feedpolicyuser` (
404404
`policy` tinyint(4) NOT NULL,
405405
`date` timestamp NULL DEFAULT CURRENT_TIMESTAMP(),
406406
UNIQUE KEY `feed_id` (`feed_id`,`user_id`)
407-
) DEFAULT CHARSET=utf8;
407+
) DEFAULT CHARSET=utf8;

core/database/pgsql/3.0.1.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,4 +380,4 @@ CREATE TABLE feedpolicyuser (
380380
user_id bigint NOT NULL,
381381
policy smallint NOT NULL,
382382
date TIMESTAMP DEFAULT CURRENT_TIMESTAMP
383-
) ;
383+
) ;

core/database/pgsql/3.1.0.sql

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,5 +442,3 @@ CREATE TABLE user2group (
442442
user_id bigint NOT NULL,
443443
group_id bigint NOT NULL
444444
);
445-
446-

core/database/upgrade/3.2.10.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function preUpgrade()
2929

3030
public function mysql()
3131
{
32-
$this->db->query("CREATE TABLE `newuserinvitation` (
32+
$this->db->query("CREATE TABLE IF NOT EXISTS `newuserinvitation` (
3333
`newuserinvitation_id` bigint(20) NOT NULL AUTO_INCREMENT,
3434
`auth_key` varchar(255) NOT NULL,
3535
`email` varchar(255) NOT NULL,
@@ -39,7 +39,7 @@ public function mysql()
3939
`date_creation` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
4040
PRIMARY KEY (`newuserinvitation_id`)
4141
)");
42-
$this->db->query("CREATE TABLE `pendinguser` (
42+
$this->db->query("CREATE TABLE IF NOT EXISTS `pendinguser` (
4343
`pendinguser_id` bigint(20) NOT NULL AUTO_INCREMENT,
4444
`auth_key` varchar(255) NOT NULL,
4545
`email` varchar(255) NOT NULL,

core/database/upgrade/3.2.12.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function mysql()
3333
$this->db->query("ALTER TABLE `user` ADD COLUMN `salt` varchar(64) NOT NULL default ''");
3434
$this->db->query("ALTER TABLE `pendinguser` ADD COLUMN `salt` varchar(64) NOT NULL default ''");
3535

36-
$this->db->query("CREATE TABLE `password` (
36+
$this->db->query("CREATE TABLE IF NOT EXISTS `password` (
3737
`hash` varchar(128) NOT NULL,
3838
PRIMARY KEY (`hash`)
3939
) ENGINE=InnoDB DEFAULT CHARSET=utf8");

core/database/upgrade/3.2.2.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public function preUpgrade()
149149
public function mysql()
150150
{
151151
// Create the license table
152-
$this->db->query("CREATE TABLE `license` (
152+
$this->db->query("CREATE TABLE IF NOT EXISTS `license` (
153153
`license_id` bigint(20) NOT NULL AUTO_INCREMENT,
154154
`name` TEXT NOT NULL,
155155
`fulltext` TEXT NOT NULL,

core/database/upgrade/3.2.4.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function preUpgrade()
3030

3131
public function mysql()
3232
{
33-
$this->db->query("CREATE TABLE `activedownload` (
33+
$this->db->query("CREATE TABLE IF NOT EXISTS `activedownload` (
3434
`activedownload_id` bigint(20) NOT NULL AUTO_INCREMENT,
3535
`ip` varchar(100) NOT NULL DEFAULT '',
3636
`date_creation` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,

core/database/upgrade/3.2.7.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function preUpgrade()
2929

3030
public function mysql()
3131
{
32-
$this->db->query("CREATE TABLE `progress` (
32+
$this->db->query("CREATE TABLE IF NOT EXISTS `progress` (
3333
`progress_id` bigint(20) NOT NULL AUTO_INCREMENT,
3434
`message` TEXT NOT NULL,
3535
`current` bigint(20) NOT NULL,

modules/batchmake/database/mysql/0.1.0.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ CREATE TABLE IF NOT EXISTS condor_job (
2828
error_filename text NOT NULL,
2929
log_filename text NOT NULL,
3030
PRIMARY KEY (condor_job_id)
31-
) DEFAULT CHARSET=utf8;
31+
) DEFAULT CHARSET=utf8;

modules/batchmake/database/pgsql/0.1.0.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ CREATE TABLE condor_job (
2424
output_filename text NOT NULL,
2525
error_filename text NOT NULL,
2626
log_filename text NOT NULL
27-
);
27+
);

0 commit comments

Comments
 (0)