Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1031

Create ddl scripts begin with drop statements, even when there are separate drop scripts

    Details

      Description

      The create-* DDL scripts distributed with SOA-P modeshape start with drop statements like below. Not sure if this is a bug or intentional but it looks strange given there are also drop-* scripts distributed. The issue I'm seeing with this is that it would be hard for scripts to detect if any important statements failed. Also the error messages could be potentially confusing for some users.

      drop table DNA_NAMESPACES cascade constraints
      drop table DNA_WORKSPACES cascade constraints
      drop table MODE_OPTIONS cascade constraints
      drop table MODE_SIMPLE_LARGE_VALUES cascade constraints
      drop table MODE_SIMPLE_NODE cascade constraints
      drop table MODE_SUBGRAPH_NODES cascade constraints
      drop table MODE_SUBGRAPH_QUERIES cascade constraints
      drop table ModeShape_LARGEVALUE_USAGES cascade constraints
      drop sequence hibernate_sequence
      create table DNA_NAMESPACES (id number(19,0) not null, URI varchar2(512 char), primary key (id))
      create table DNA_WORKSPACES (id number(19,0) not null, NAME varchar2(128 char) not null, primary key (id))
      create table MODE_OPTIONS (NAME varchar2(128 char) not null, VALUE varchar2(512 char) not null, primary key (NAME))
      create table MODE_SIMPLE_LARGE_VALUES (SHA1 varchar2(40 char) not null, COMPRESSED number(1,0), DATA blob not null, LENGTH number(19,0) not null, TYPE varchar2(255 char) not null, primary key (SHA1))
      create table MODE_SIMPLE_NODE (ID number(19,0) not null, ALLOWS_SNS number(1,0) not null, CHILD_NAME_LOCAL varchar2(512 char), COMPRESSED number(1,0), DATA blob, CHILD_INDEX number(10,0) not null, NODE_UUID varchar2(36 char) not null, NUM_PROPS number(10,0) not null, ENFORCEREFINTEG number(1,0) not null, SNS_INDEX number(10,0) not null, WORKSPACE_ID number(19,0) not null, CHILD_NAME_NS_ID number(19,0), PARENT_ID number(19,0), primary key (ID))
      create table MODE_SUBGRAPH_NODES (ID number(19,0) not null, DEPTH number(10,0) not null, CHILD_NUM number(10,0) not null, UUID varchar2(36 char) not null, PARENT_NUM number(10,0) not null, QUERY_ID number(19,0) not null, primary key (ID))
      create table MODE_SUBGRAPH_QUERIES (ID number(19,0) not null, ROOT_UUID varchar2(36 char) not null, WORKSPACE_ID number(19,0) not null, primary key (ID))
      create table ModeShape_LARGEVALUE_USAGES (ID number(19,0) not null, largeValues_SHA1 varchar2(40 char) not null, primary key (ID, largeValues_SHA1))
      create index NS_URI_INX on DNA_NAMESPACES (URI)
      create index WS_NAME_INX on DNA_WORKSPACES (NAME)
      create index CHILDINDEX_INX on MODE_SIMPLE_NODE (WORKSPACE_ID, PARENT_ID, CHILD_INDEX)
      create index CHILDNAME_INX on MODE_SIMPLE_NODE (WORKSPACE_ID, PARENT_ID, CHILD_NAME_NS_ID, CHILD_NAME_LOCAL, SNS_INDEX)
      create index NODEUUID_INX on MODE_SIMPLE_NODE (WORKSPACE_ID, NODE_UUID)
      alter table MODE_SIMPLE_NODE add constraint FKE43E2BD346EF783F foreign key (CHILD_NAME_NS_ID) references DNA_NAMESPACES
      alter table MODE_SIMPLE_NODE add constraint FKE43E2BD360F39011 foreign key (PARENT_ID) references MODE_SIMPLE_NODE
      create index QUERYID_INX on MODE_SUBGRAPH_NODES (QUERY_ID, UUID, DEPTH)
      alter table ModeShape_LARGEVALUE_USAGES add constraint FK4B54E5DAE58CEC5C foreign key (ID) references MODE_SIMPLE_NODE
      alter table ModeShape_LARGEVALUE_USAGES add constraint FK4B54E5DA1B6FBC1C foreign key (largeValues_SHA1) references MODE_SIMPLE_LARGE_VALUES
      create sequence hibernate_sequence

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  van.halbert Van Halbert
                  Reporter:
                  akostadinov Aleksandar Kostadinov
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: