Skip to content

Commit

Permalink
0005001: Postgres converts json and uuid types to text for create table
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed May 21, 2021
1 parent 60a4b73 commit 24753da
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
Expand Up @@ -41,6 +41,7 @@
import org.jumpmind.db.platform.oracle.Oracle122DdlBuilder;
import org.jumpmind.db.platform.oracle.OracleDdlBuilder;
import org.jumpmind.db.platform.postgresql.PostgreSqlDdlBuilder;
import org.jumpmind.db.platform.postgresql.PostgreSqlDdlBuilder95;
import org.jumpmind.db.platform.redshift.RedshiftDdlBuilder;
import org.jumpmind.db.platform.sqlanywhere.SqlAnywhereDdlBuilder;
import org.jumpmind.db.platform.sqlite.SqliteDdlBuilder;
Expand Down Expand Up @@ -94,9 +95,10 @@ public static final IDdlBuilder createDdlBuilder(String databaseName) {
return new OracleDdlBuilder();
} else if (DatabaseNamesConstants.ORACLE122.equalsIgnoreCase(databaseName)) {
return new Oracle122DdlBuilder();
} else if (DatabaseNamesConstants.POSTGRESQL.equalsIgnoreCase(databaseName)
|| DatabaseNamesConstants.POSTGRESQL95.equalsIgnoreCase(databaseName)) {
} else if (DatabaseNamesConstants.POSTGRESQL.equalsIgnoreCase(databaseName)) {
return new PostgreSqlDdlBuilder();
} else if (DatabaseNamesConstants.POSTGRESQL95.equalsIgnoreCase(databaseName)) {
return new PostgreSqlDdlBuilder95();
} else if (DatabaseNamesConstants.SQLITE.equalsIgnoreCase(databaseName)) {
return new SqliteDdlBuilder();
} else if (DatabaseNamesConstants.ASE.equalsIgnoreCase(databaseName)) {
Expand Down
@@ -0,0 +1,29 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jumpmind.db.platform.postgresql;

import org.jumpmind.db.platform.DatabaseNamesConstants;

public class PostgreSqlDdlBuilder95 extends PostgreSqlDdlBuilder {

public PostgreSqlDdlBuilder95() {
this.databaseName = DatabaseNamesConstants.POSTGRESQL95;
}

}
Expand Up @@ -29,6 +29,11 @@ public PostgreSql95DatabasePlatform(DataSource dataSource, SqlTemplateSettings s
super(dataSource, settings);
}

@Override
protected PostgreSqlDdlBuilder95 createDdlBuilder() {
return new PostgreSqlDdlBuilder95();
}

public String getName() {
return DatabaseNamesConstants.POSTGRESQL95;
}
Expand Down

0 comments on commit 24753da

Please sign in to comment.