           (
           id                                               serial NOT NULL,
           fk_appshare_application_id                       integer,
+          fk_appshare_schema_id                            integer,
           application_environment                          character varying,
           database_schema_name                             character varying,
           CONSTRAINT appshare_applications_schemas_pkey    PRIMARY KEY (id)

          (
          id                                             NUMBER GENERATED BY DEFAULT ON NULL AS IDENTITY,
          fk_appshare_application_id                     NUMBER,
          application_environment                        VARCHAR2(200 BYTE),
          database_schema_name                           VARCHAR2(200 BYTE),
          CONSTRAINT  APPSHARE_APPLICATION_SCHEMAS_PK    PRIMARY KEY (ID)

      (korma.core/exec-raw   [sql-to-create-app-schemas-table []]   [])
      nil)))












(defn make-schemas-table []
  (let [sql-to-create-schemas-table
        (cond
          (= *database-type* "postgres" )
          "
          CREATE TABLE public.appshare_schemas
          (
          id                                               serial NOT NULL,
          fk_appshare_publisher_id                         integer,
          application_environment                          character varying,
          database_schema_name                             character varying,
          CONSTRAINT appshare_schemas_pkey    PRIMARY KEY (id)
          );
          "

          (= *database-type* "oracle" )
          "
          CREATE TABLE appshare_schemas
          (
          id                                             NUMBER GENERATED BY DEFAULT ON NULL AS IDENTITY,
          fk_appshare_publisher_id                       NUMBER,
          application_environment                        VARCHAR2(200 BYTE),
          database_schema_name                           VARCHAR2(200 BYTE),
          CONSTRAINT  APPSHARE_SCHEMAS_PK    PRIMARY KEY (ID)
          )")
        ]

    (if (not (does-table-exist  "appshare_schemas"))
      (korma.core/exec-raw   [sql-to-create-schemas-table []]   [])
      nil)))



