empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Döbele (JIRA) <empire-db-...@incubator.apache.org>
Subject [jira] [Closed] (EMPIREDB-104) Create DDL Script on MSSQL should state not CREATE DATABASE if already exist
Date Mon, 04 Feb 2013 14:14:19 GMT

     [ https://issues.apache.org/jira/browse/EMPIREDB-104?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rainer Döbele closed EMPIREDB-104.
----------------------------------


Cleanup of unclosed issues.
                
> Create DDL Script on MSSQL should state not CREATE DATABASE if already exist
> ----------------------------------------------------------------------------
>
>                 Key: EMPIREDB-104
>                 URL: https://issues.apache.org/jira/browse/EMPIREDB-104
>             Project: Empire-DB
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: empire-db-2.1.0-incubating
>            Reporter: Ghislain Geffroy
>            Assignee: Francis De Brabandere
>             Fix For: empire-db-2.2.0-incubating
>
>
> Same type of error than EMPIREDB-101.
> A way to solve the problem is to replace in org.apache.empire.db.sqlserver.DBDatabaseDriverMSSQL$createDatabase()
the line
>  script.addStmt("CREATE DATABASE " + databaseName);
> by 
>  script.addStmt("IF NOT EXISTS(SELECT * FROM sys.databases WHERE name = '" + databaseName
+ "')  CREATE DATABASE " + databaseName);

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message