Skip to content

Commit

Permalink
Fix so DDL script for Oracle can be executed in SQLPlus
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpl committed Oct 27, 2014
1 parent 922f30c commit 9aa55d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions SQL/oracle.initial.sql
Expand Up @@ -20,7 +20,7 @@ BEFORE INSERT ON "users" FOR EACH ROW
BEGIN
:NEW."user_id" := "users_seq".nextval;
END;

/

CREATE TABLE "session" (
"sess_id" varchar(128) NOT NULL PRIMARY KEY,
Expand Down Expand Up @@ -60,7 +60,7 @@ BEFORE INSERT ON "identities" FOR EACH ROW
BEGIN
:NEW."identity_id" := "identities_seq".nextval;
END;

/

CREATE TABLE "contacts" (
"contact_id" integer PRIMARY KEY,
Expand All @@ -86,7 +86,7 @@ BEFORE INSERT ON "contacts" FOR EACH ROW
BEGIN
:NEW."contact_id" := "contacts_seq".nextval;
END;

/

CREATE TABLE "contactgroups" (
"contactgroup_id" integer PRIMARY KEY,
Expand All @@ -107,7 +107,7 @@ BEFORE INSERT ON "contactgroups" FOR EACH ROW
BEGIN
:NEW."contactgroup_id" := "contactgroups_seq".nextval;
END;

/

CREATE TABLE "contactgroupmembers" (
"contactgroup_id" integer NOT NULL
Expand Down Expand Up @@ -211,7 +211,7 @@ BEFORE INSERT ON "searches" FOR EACH ROW
BEGIN
:NEW."search_id" := "searches_seq".nextval;
END;

/

CREATE TABLE "system" (
"name" varchar(64) NOT NULL PRIMARY KEY,
Expand Down
2 changes: 1 addition & 1 deletion program/lib/Roundcube/rcube_db_oracle.php
Expand Up @@ -500,7 +500,7 @@ public function exec_script($sql)

foreach (explode("\n", $sql) as $line) {
$tok = strtolower(trim($line));
if (preg_match('/^--/', $line) || $tok == '') {
if (preg_match('/^--/', $line) || $tok == '' || $tok == '/') {
continue;
}

Expand Down

0 comments on commit 9aa55d5

Please sign in to comment.