empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Cournarie (JIRA)" <empire-db-...@incubator.apache.org>
Subject [jira] Commented: (EMPIREDB-101) Create DDL Script on MySQL should state CREATE DATABASE IF NOT EXISTS
Date Tue, 01 Feb 2011 15:18:28 GMT

    [ https://issues.apache.org/jira/browse/EMPIREDB-101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12989237#comment-12989237

Eric Cournarie commented on EMPIREDB-101:

When connecting to MySQL, the schema should have been created before. The URL is something
like jdbc:mysql://localhost:3306/testing, where testing is my schema name.

If I use getCreateDDLScript to create the tables, the script adds the CREATE DATABASE statement,
which fails if you do not specifiy IF NOT EXIST. The other solution would be the getCreateDDLScript
method to take another boolean argument requesting to include or not the create database statement.

You may check the sample attachment I have included in  DBEMPIRE-100.

> Create DDL Script on MySQL should state CREATE DATABASE IF NOT EXISTS
> ---------------------------------------------------------------------
>                 Key: EMPIREDB-101
>                 URL: https://issues.apache.org/jira/browse/EMPIREDB-101
>             Project: Empire-DB
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: empire-db-2.0.6-incubating
>            Reporter: Eric Cournarie
> To connect to MySQL, the schema should be created first. So when using getCreateDDLScript,
it fails complaining the schema already exist. Adding IF NOT EXIST solves the problem.

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message