]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed some bad Postgres SQL that I made! :-)
authormoodler <moodler>
Wed, 20 Aug 2003 12:09:15 +0000 (12:09 +0000)
committermoodler <moodler>
Wed, 20 Aug 2003 12:09:15 +0000 (12:09 +0000)
backup/db/postgres7.sql

index 8a951ee1f1909f58f1a778ee7e1f8d2c67874058..b104f6846dfb56fd4b229ec1e880760b53609e16 100644 (file)
@@ -6,16 +6,17 @@
 #
 
 CREATE TABLE prefix_backup_files (
-  prefix_backup_codetypepath_idx PRIMARY KEY,
   backup_code integer NOT NULL default '0',
   file_type varchar(10) NOT NULL default '',
   path varchar(255) NOT NULL default '',
   old_id integer default NULL,
   new_id integer default NULL,
-) TYPE=MyISAM COMMENT='To store and recode ids to user and course files.';
+  PRIMARY KEY (backup_code, file_type, path)
+);
+
 # --------------------------------------------------------
 
-CREATE INDEX prefix_backup_codetypepath_idx ON prefix_backup_files (backup_code,file_type,path)
+CREATE INDEX prefix_backup_codetypepath_idx ON prefix_backup_files (backup_code,file_type,path);
 
 #
 # Table structure for table prefix_backup_ids
@@ -28,7 +29,9 @@ CREATE TABLE prefix_backup_ids (
   old_id int(10) unsigned NOT NULL default '0',
   new_id int(10) unsigned default NULL,
   info mediumtext,
-) TYPE=MyISAM COMMENT='To store and convert ids in backup/restore';
+  PRIMARY KEY (backup_code, table_name, old_id)
+);
+
+CREATE INDEX prefix_backup_codenameid_idx ON prefix_backup_ids (backup_code,table_name,old_id);
 
-CREATE INDEX prefix_backup_codenameid_idx ON prefix_backup_ids (backup_code,table_name,old_id)