Skip to content

Commit

Permalink
Fixed issue: Cannot install on Postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Sep 29, 2017
1 parent 3b39ac6 commit f4827a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion installer/sql/create-mssql.sql
Expand Up @@ -783,7 +783,7 @@ INSERT INTO [prefix_template_configuration] ([template_name],[sid],[gsid],[uid],
-- Table prefix_surveys_groups
-- -----------------------------------------------------
CREATE TABLE [prefix_surveys_groups] (
[gsid] int NOT NULL PRIMARY KEY,
[gsid] int NOT NULL IDENTITY (1,1) PRIMARY KEY,
[name] varchar(45) NOT NULL,
[title] varchar(100) NULL,
[template] varchar(128) NULL DEFAULT 'default',
Expand Down
17 changes: 7 additions & 10 deletions installer/sql/create-pgsql.sql
Expand Up @@ -600,8 +600,7 @@ CREATE TABLE prefix_notifications (
"display_class" character varying(31) DEFAULT 'default',
"hash" character varying(64) DEFAULT NULL,
"created" timestamp NOT NULL,
"first_read" timestamp DEFAULT NULL,
CONSTRAINT prefix_notifications_pkey PRIMARY KEY (id)
"first_read" timestamp DEFAULT NULL
);
CREATE INDEX prefix_index ON prefix_notifications USING btree (entity, entity_id, status);
CREATE INDEX notif_hash_index ON prefix_notifications USING btree (hash);
Expand Down Expand Up @@ -636,16 +635,15 @@ CREATE TABLE prefix_surveymenu (
"changed_at" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
"changed_by" integer NOT NULL DEFAULT '0',
"created_at" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
"created_by" integer NOT NULL DEFAULT '0',
PRIMARY KEY ("id")
"created_by" integer NOT NULL DEFAULT '0'
);

create index surveymenu_ordering_index on prefix_surveymenu ("ordering");
create index surveymenu_title_index on prefix_surveymenu ("title");


INSERT INTO prefix_surveymenu VALUES (1,NULL,NULL,NULL,0,0,'surveymenu','side','Main survey menu',NOW(),0,NOW(),0);
INSERT INTO prefix_surveymenu VALUES (2,NULL,NULL,NULL,0,0,'quickmenue','collapsed','quickmenu',NOW(),0,NOW(),0);
INSERT INTO prefix_surveymenu VALUES (1,NULL,NULL,NULL,0,0,'surveymenu','side','Main survey menu',1, NOW(),0,NOW(),0);
INSERT INTO prefix_surveymenu VALUES (2,NULL,NULL,NULL,0,0,'quickmenue','collapsed','quickmenu',1, NOW(),0,NOW(),0);

--
-- Surveymenu entries
Expand Down Expand Up @@ -675,11 +673,10 @@ CREATE TABLE prefix_surveymenu_entries (
"changed_at" timestamp NULL,
"changed_by" integer NOT NULL DEFAULT '0',
"created_at" timestamp NOT NULL,
"created_by" integer NOT NULL DEFAULT '0',
PRIMARY KEY (id)
"created_by" integer NOT NULL DEFAULT '0'
);

create index surveymenu_entries_menu_id_index on prefix_surveymenu_entries (menu_id_index);
create index surveymenu_entries_menu_id_index on prefix_surveymenu_entries ("menu_id");
create index surveymenu_entries_ordering_index on prefix_surveymenu_entries ("ordering");
create index surveymenu_entries_title_index on prefix_surveymenu_entries (title);
create index surveymenu_entries_menu_title_index on prefix_surveymenu_entries (menu_title);
Expand Down Expand Up @@ -800,7 +797,7 @@ CREATE TABLE "prefix_surveys_groups" (
);


INSERT INTO "prefix_surveys_groups" ("gsid", "name", "title", "description", "order", "owner_uid", "parent_id", "created", "modified", "created_by") VALUES
INSERT INTO "prefix_surveys_groups" ("gsid", "name", "title", "description", "sortorder", "owner_uid", "parent_id", "created", "modified", "created_by") VALUES
(1, 'default', 'Default Survey Group', 'LimeSurvey core default survey group', 0, 1, NULL, '2017-07-20 17:09:30', '2017-07-20 17:09:30', 1);

--
Expand Down

0 comments on commit f4827a1

Please sign in to comment.