diff --git a/.gitignore b/.gitignore index 9791221..4ae1de9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,139 +1,38 @@ -### Intellij template -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider -# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 - -# User-specific stuff -.idea/**/workspace.xml -.idea/**/tasks.xml -.idea/**/usage.statistics.xml -.idea/**/dictionaries -.idea/**/shelf - -# AWS User-specific -.idea/**/aws.xml - -# Generated files -.idea/**/contentModel.xml - -# Sensitive or high-churn files -.idea/**/dataSources/ -.idea/**/dataSources.ids -.idea/**/dataSources.local.xml -.idea/**/sqlDataSources.xml -.idea/**/dynamic.xml -.idea/**/uiDesigner.xml -.idea/**/dbnavigator.xml - -# Gradle -.idea/**/gradle.xml -.idea/**/libraries - -# Gradle and Maven with auto-import -# When using Gradle or Maven with auto-import, you should exclude module files, -# since they will be recreated, and may cause churn. Uncomment if using -# auto-import. -# .idea/artifacts -# .idea/compiler.xml -# .idea/jarRepositories.xml -# .idea/modules.xml -# .idea/*.iml -# .idea/modules -# *.iml -# *.ipr - -# CMake -cmake-build-*/ - -# Mongo Explorer plugin -.idea/**/mongoSettings.xml - -# File-based project format -*.iws - -# IntelliJ -out/ - -# mpeltonen/sbt-idea plugin -.idea_modules/ - -# JIRA plugin -atlassian-ide-plugin.xml - -# Cursive Clojure plugin -.idea/replstate.xml - -# SonarLint plugin -.idea/sonarlint/ - -# Crashlytics plugin (for Android Studio and IntelliJ) -com_crashlytics_export_strings.xml -crashlytics.properties -crashlytics-build.properties -fabric.properties - -# Editor-based Rest Client -.idea/httpRequests - -# Android studio 3.1+ serialized cache file -.idea/caches/build_file_checksums.ser - -### Java template -# Compiled class file -*.class - -# Log file -*.log - -# BlueJ files -*.ctxt - -# Mobile Tools for Java (J2ME) -.mtj.tmp/ - -# Package Files # -*.jar -*.war -*.nar -*.ear -*.zip -*.tar.gz -*.rar - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* -replay_pid* - -### Maven template +HELP.md target/ -pom.xml.tag -pom.xml.releaseBackup -pom.xml.versionsBackup -pom.xml.next -release.properties -dependency-reduced-pom.xml -buildNumber.properties -.mvn/timing.properties -# https://github.com/takari/maven-wrapper#usage-without-binary-jar -.mvn/wrapper/maven-wrapper.jar +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ -# Eclipse m2e generated files -# Eclipse Core -.project -# JDT-specific (Eclipse Java Development Tools) +### STS ### +.apt_generated .classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache +.fastRequest -### Git template -# Created by git for backups. To disable backups in Git: -# $ git config --global mergetool.keepBackup false -*.orig - -# Created by git when using merge tools for conflicts -*.BACKUP.* -*.BASE.* -*.LOCAL.* -*.REMOTE.* -*_BACKUP_*.txt -*_BASE_*.txt -*_LOCAL_*.txt -*_REMOTE_*.txt - +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr +.version* +.back* + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ +*.log +*.gz \ No newline at end of file diff --git a/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/ClickHouseDatabaseExtension.java b/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/ClickHouseDatabaseExtension.java index 728ace9..96d0422 100644 --- a/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/ClickHouseDatabaseExtension.java +++ b/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/ClickHouseDatabaseExtension.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-clickhouse + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * diff --git a/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/clickhouse/ClickHouseConfigurationExtension.java b/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/clickhouse/ClickHouseConfigurationExtension.java index 394e29b..8863ec3 100644 --- a/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/clickhouse/ClickHouseConfigurationExtension.java +++ b/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/clickhouse/ClickHouseConfigurationExtension.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-clickhouse + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * diff --git a/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/clickhouse/ClickHouseConnection.java b/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/clickhouse/ClickHouseConnection.java index bd6e54c..1e228b1 100644 --- a/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/clickhouse/ClickHouseConnection.java +++ b/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/clickhouse/ClickHouseConnection.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-clickhouse + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * diff --git a/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/clickhouse/ClickHouseDatabase.java b/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/clickhouse/ClickHouseDatabase.java index ccbe7c0..79dba05 100644 --- a/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/clickhouse/ClickHouseDatabase.java +++ b/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/clickhouse/ClickHouseDatabase.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-clickhouse + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * diff --git a/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/clickhouse/ClickHouseDatabaseType.java b/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/clickhouse/ClickHouseDatabaseType.java index 8575ca6..6e9fc26 100644 --- a/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/clickhouse/ClickHouseDatabaseType.java +++ b/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/clickhouse/ClickHouseDatabaseType.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-clickhouse + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * diff --git a/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/clickhouse/ClickHouseParser.java b/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/clickhouse/ClickHouseParser.java index 971b68d..aebff9f 100644 --- a/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/clickhouse/ClickHouseParser.java +++ b/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/clickhouse/ClickHouseParser.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-clickhouse + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * diff --git a/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/clickhouse/ClickHouseSchema.java b/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/clickhouse/ClickHouseSchema.java index b005b57..8bdcaa5 100644 --- a/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/clickhouse/ClickHouseSchema.java +++ b/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/clickhouse/ClickHouseSchema.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-clickhouse + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * diff --git a/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/clickhouse/ClickHouseTable.java b/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/clickhouse/ClickHouseTable.java index 9a9ecb4..00d5e08 100644 --- a/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/clickhouse/ClickHouseTable.java +++ b/flyway-database-clickhouse/src/main/java/org/flywaydb/community/database/clickhouse/ClickHouseTable.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-clickhouse + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * diff --git a/flyway-database-databricks/src/main/java/org/flywaydb/community/database/DatabricksDatabaseExtension.java b/flyway-database-databricks/src/main/java/org/flywaydb/community/database/DatabricksDatabaseExtension.java index ea432ea..4ff06c2 100644 --- a/flyway-database-databricks/src/main/java/org/flywaydb/community/database/DatabricksDatabaseExtension.java +++ b/flyway-database-databricks/src/main/java/org/flywaydb/community/database/DatabricksDatabaseExtension.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-databricks + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * diff --git a/flyway-database-databricks/src/main/java/org/flywaydb/community/database/databricks/DatabricksConnection.java b/flyway-database-databricks/src/main/java/org/flywaydb/community/database/databricks/DatabricksConnection.java index 0456db9..3b51f1f 100644 --- a/flyway-database-databricks/src/main/java/org/flywaydb/community/database/databricks/DatabricksConnection.java +++ b/flyway-database-databricks/src/main/java/org/flywaydb/community/database/databricks/DatabricksConnection.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-databricks + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ package org.flywaydb.community.database.databricks; import org.flywaydb.core.api.FlywayException; diff --git a/flyway-database-databricks/src/main/java/org/flywaydb/community/database/databricks/DatabricksDatabase.java b/flyway-database-databricks/src/main/java/org/flywaydb/community/database/databricks/DatabricksDatabase.java index b96a730..ff36fac 100644 --- a/flyway-database-databricks/src/main/java/org/flywaydb/community/database/databricks/DatabricksDatabase.java +++ b/flyway-database-databricks/src/main/java/org/flywaydb/community/database/databricks/DatabricksDatabase.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-databricks + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ package org.flywaydb.community.database.databricks; import org.flywaydb.core.api.configuration.Configuration; diff --git a/flyway-database-databricks/src/main/java/org/flywaydb/community/database/databricks/DatabricksDatabaseType.java b/flyway-database-databricks/src/main/java/org/flywaydb/community/database/databricks/DatabricksDatabaseType.java index a35e7a4..592f704 100644 --- a/flyway-database-databricks/src/main/java/org/flywaydb/community/database/databricks/DatabricksDatabaseType.java +++ b/flyway-database-databricks/src/main/java/org/flywaydb/community/database/databricks/DatabricksDatabaseType.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-databricks + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ package org.flywaydb.community.database.databricks; import org.flywaydb.core.api.ResourceProvider; diff --git a/flyway-database-databricks/src/main/java/org/flywaydb/community/database/databricks/DatabricksParser.java b/flyway-database-databricks/src/main/java/org/flywaydb/community/database/databricks/DatabricksParser.java index 84ec10d..98bd064 100644 --- a/flyway-database-databricks/src/main/java/org/flywaydb/community/database/databricks/DatabricksParser.java +++ b/flyway-database-databricks/src/main/java/org/flywaydb/community/database/databricks/DatabricksParser.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-databricks + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ package org.flywaydb.community.database.databricks; import org.flywaydb.core.api.configuration.Configuration; diff --git a/flyway-database-databricks/src/main/java/org/flywaydb/community/database/databricks/DatabricksSchema.java b/flyway-database-databricks/src/main/java/org/flywaydb/community/database/databricks/DatabricksSchema.java index b562998..5930511 100644 --- a/flyway-database-databricks/src/main/java/org/flywaydb/community/database/databricks/DatabricksSchema.java +++ b/flyway-database-databricks/src/main/java/org/flywaydb/community/database/databricks/DatabricksSchema.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-databricks + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ package org.flywaydb.community.database.databricks; import org.flywaydb.core.internal.database.base.Schema; diff --git a/flyway-database-databricks/src/main/java/org/flywaydb/community/database/databricks/DatabricksTable.java b/flyway-database-databricks/src/main/java/org/flywaydb/community/database/databricks/DatabricksTable.java index 2a0bf88..f69dcec 100644 --- a/flyway-database-databricks/src/main/java/org/flywaydb/community/database/databricks/DatabricksTable.java +++ b/flyway-database-databricks/src/main/java/org/flywaydb/community/database/databricks/DatabricksTable.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-databricks + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ package org.flywaydb.community.database.databricks; import org.flywaydb.core.internal.database.InsertRowLock; diff --git a/flyway-database-databricks/src/main/java/org/flywaydb/community/database/databricks/package-info.java b/flyway-database-databricks/src/main/java/org/flywaydb/community/database/databricks/package-info.java index 25d42b2..1f101a5 100644 --- a/flyway-database-databricks/src/main/java/org/flywaydb/community/database/databricks/package-info.java +++ b/flyway-database-databricks/src/main/java/org/flywaydb/community/database/databricks/package-info.java @@ -1 +1,20 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-databricks + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ package org.flywaydb.community.database.databricks; diff --git a/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/DB2ZDatabaseExtension.java b/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/DB2ZDatabaseExtension.java index b2be151..8958da3 100644 --- a/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/DB2ZDatabaseExtension.java +++ b/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/DB2ZDatabaseExtension.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-db2zos + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2022 * diff --git a/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZCallProcedureParsedStatement.java b/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZCallProcedureParsedStatement.java index 7872e00..7749ee7 100644 --- a/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZCallProcedureParsedStatement.java +++ b/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZCallProcedureParsedStatement.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-db2zos + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2022 * diff --git a/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZConfigurationExtension.java b/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZConfigurationExtension.java index 6349f77..2692bf9 100644 --- a/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZConfigurationExtension.java +++ b/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZConfigurationExtension.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-db2zos + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2022 * diff --git a/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZConnection.java b/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZConnection.java index 29d2d3b..4620e07 100644 --- a/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZConnection.java +++ b/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZConnection.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-db2zos + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2022 * diff --git a/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZDatabase.java b/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZDatabase.java index 8337262..e12a6f8 100644 --- a/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZDatabase.java +++ b/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZDatabase.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-db2zos + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2022 * diff --git a/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZDatabaseType.java b/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZDatabaseType.java index 2ae3516..f9485b6 100644 --- a/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZDatabaseType.java +++ b/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZDatabaseType.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-db2zos + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2022 * diff --git a/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZFunction.java b/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZFunction.java index 22b63ee..734d785 100644 --- a/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZFunction.java +++ b/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZFunction.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-db2zos + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2022 * diff --git a/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZJdbcTemplate.java b/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZJdbcTemplate.java index 8982518..46c6350 100644 --- a/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZJdbcTemplate.java +++ b/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZJdbcTemplate.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-db2zos + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2022 * diff --git a/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZParser.java b/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZParser.java index 4eb8210..eec3203 100644 --- a/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZParser.java +++ b/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZParser.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-db2zos + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2022 * diff --git a/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZSchema.java b/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZSchema.java index 37a3400..d63bdcb 100644 --- a/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZSchema.java +++ b/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZSchema.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-db2zos + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2022 * diff --git a/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZTable.java b/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZTable.java index db36c28..ddae939 100644 --- a/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZTable.java +++ b/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZTable.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-db2zos + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2022 * diff --git a/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZType.java b/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZType.java index e7c0610..ba18d36 100644 --- a/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZType.java +++ b/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/DB2ZType.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-db2zos + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2022 * diff --git a/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/package-info.java b/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/package-info.java index 43b9a17..37682ab 100644 --- a/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/package-info.java +++ b/flyway-database-db2zos/src/main/java/org/flywaydb/community/database/db2z/package-info.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-db2zos + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2022 * diff --git a/flyway-database-ignite/src/main/java/org/flywaydb/community/database/IgniteDatabaseExtension.java b/flyway-database-ignite/src/main/java/org/flywaydb/community/database/IgniteDatabaseExtension.java index e5b0828..18979f1 100644 --- a/flyway-database-ignite/src/main/java/org/flywaydb/community/database/IgniteDatabaseExtension.java +++ b/flyway-database-ignite/src/main/java/org/flywaydb/community/database/IgniteDatabaseExtension.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-ignite + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * diff --git a/flyway-database-ignite/src/main/java/org/flywaydb/community/database/ignite/thin/IgniteThinConnection.java b/flyway-database-ignite/src/main/java/org/flywaydb/community/database/ignite/thin/IgniteThinConnection.java index 5b89cc1..92f1c00 100644 --- a/flyway-database-ignite/src/main/java/org/flywaydb/community/database/ignite/thin/IgniteThinConnection.java +++ b/flyway-database-ignite/src/main/java/org/flywaydb/community/database/ignite/thin/IgniteThinConnection.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-ignite + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * @@ -43,4 +62,4 @@ public Schema getSchema(String name) { protected String getCurrentSchemaNameOrSearchPath() throws SQLException { return getJdbcConnection().getSchema(); } -} \ No newline at end of file +} diff --git a/flyway-database-ignite/src/main/java/org/flywaydb/community/database/ignite/thin/IgniteThinDatabase.java b/flyway-database-ignite/src/main/java/org/flywaydb/community/database/ignite/thin/IgniteThinDatabase.java index 4b987ad..f086647 100644 --- a/flyway-database-ignite/src/main/java/org/flywaydb/community/database/ignite/thin/IgniteThinDatabase.java +++ b/flyway-database-ignite/src/main/java/org/flywaydb/community/database/ignite/thin/IgniteThinDatabase.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-ignite + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * @@ -160,4 +179,4 @@ public String getBooleanFalse() { public boolean catalogIsSchema() { return false; } -} \ No newline at end of file +} diff --git a/flyway-database-ignite/src/main/java/org/flywaydb/community/database/ignite/thin/IgniteThinDatabaseType.java b/flyway-database-ignite/src/main/java/org/flywaydb/community/database/ignite/thin/IgniteThinDatabaseType.java index 8f5bbab..1e29742 100644 --- a/flyway-database-ignite/src/main/java/org/flywaydb/community/database/ignite/thin/IgniteThinDatabaseType.java +++ b/flyway-database-ignite/src/main/java/org/flywaydb/community/database/ignite/thin/IgniteThinDatabaseType.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-ignite + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * diff --git a/flyway-database-ignite/src/main/java/org/flywaydb/community/database/ignite/thin/IgniteThinParser.java b/flyway-database-ignite/src/main/java/org/flywaydb/community/database/ignite/thin/IgniteThinParser.java index 9231d8b..423fd10 100644 --- a/flyway-database-ignite/src/main/java/org/flywaydb/community/database/ignite/thin/IgniteThinParser.java +++ b/flyway-database-ignite/src/main/java/org/flywaydb/community/database/ignite/thin/IgniteThinParser.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-ignite + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * @@ -52,4 +71,4 @@ protected Token handleAlternativeStringLiteral(PeekingReader reader, ParserConte protected Boolean detectCanExecuteInTransaction(String simplifiedStatement, List keywords) { return keywords.stream().noneMatch(token -> token.getType().equals(TokenType.KEYWORD) && DDL_KEYWORDS.contains(token.getText())); } -} \ No newline at end of file +} diff --git a/flyway-database-ignite/src/main/java/org/flywaydb/community/database/ignite/thin/IgniteThinSchema.java b/flyway-database-ignite/src/main/java/org/flywaydb/community/database/ignite/thin/IgniteThinSchema.java index 7c00ddf..816d657 100644 --- a/flyway-database-ignite/src/main/java/org/flywaydb/community/database/ignite/thin/IgniteThinSchema.java +++ b/flyway-database-ignite/src/main/java/org/flywaydb/community/database/ignite/thin/IgniteThinSchema.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-ignite + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * @@ -166,4 +185,4 @@ private List listObjectNames(String objectType, String querySuffix) thro public Table getTable(String tableName) { return new IgniteThinTable(jdbcTemplate, database, this, tableName); } -} \ No newline at end of file +} diff --git a/flyway-database-ignite/src/main/java/org/flywaydb/community/database/ignite/thin/IgniteThinTable.java b/flyway-database-ignite/src/main/java/org/flywaydb/community/database/ignite/thin/IgniteThinTable.java index 9259cc8..0639edf 100644 --- a/flyway-database-ignite/src/main/java/org/flywaydb/community/database/ignite/thin/IgniteThinTable.java +++ b/flyway-database-ignite/src/main/java/org/flywaydb/community/database/ignite/thin/IgniteThinTable.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-ignite + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * @@ -100,4 +119,4 @@ private boolean insertLockingRow() { // Succeeded if no errors. return results.getException() == null; } -} \ No newline at end of file +} diff --git a/flyway-database-ignite/src/main/java/org/flywaydb/community/database/ignite/thin/package-info.java b/flyway-database-ignite/src/main/java/org/flywaydb/community/database/ignite/thin/package-info.java index 359c284..c0cc065 100644 --- a/flyway-database-ignite/src/main/java/org/flywaydb/community/database/ignite/thin/package-info.java +++ b/flyway-database-ignite/src/main/java/org/flywaydb/community/database/ignite/thin/package-info.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-ignite + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * @@ -16,4 +35,4 @@ /** * Community-supported package. No compatibility guarantees provided. */ -package org.flywaydb.community.database.ignite.thin; \ No newline at end of file +package org.flywaydb.community.database.ignite.thin; diff --git a/flyway-database-kingbase/pom.xml b/flyway-database-kingbase/pom.xml new file mode 100644 index 0000000..0abfe8b --- /dev/null +++ b/flyway-database-kingbase/pom.xml @@ -0,0 +1,71 @@ + + + + 4.0.0 + + org.flywaydb + flyway-community-db-support + 10.16.1 + + + flyway-database-kingbase + ${project.artifactId} + + + + ${project.groupId} + flyway-core + + + ${project.groupId} + flyway-database-postgresql + ${version.flyway} + + + org.flywaydb + flyway-core + + + + + org.projectlombok + lombok + provided + + + + + + + src/main/resources + true + + + + + maven-resources-plugin + + + maven-jar-plugin + + + + \ No newline at end of file diff --git a/flyway-database-kingbase/src/main/java/org/flywaydb/community/database/KingbaseDatabaseExtension.java b/flyway-database-kingbase/src/main/java/org/flywaydb/community/database/KingbaseDatabaseExtension.java new file mode 100644 index 0000000..5fb3923 --- /dev/null +++ b/flyway-database-kingbase/src/main/java/org/flywaydb/community/database/KingbaseDatabaseExtension.java @@ -0,0 +1,59 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-yugabytedb + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ +/* + * Copyright (C) Red Gate Software Ltd 2010-2024 + * + * Licensed 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.flywaydb.community.database; + +import org.flywaydb.core.api.FlywayException; +import org.flywaydb.core.extensibility.PluginMetadata; +import org.flywaydb.core.internal.util.FileUtils; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; + +public class KingbaseDatabaseExtension implements PluginMetadata { + public String getDescription() { + return "Community-contributed kingbase database support extension " + readVersion() + " by Redgate"; + } + + public static String readVersion() { + try { + return FileUtils.copyToString( + KingbaseDatabaseExtension.class.getClassLoader().getResourceAsStream("org/flywaydb/community" + + "/database/kingbase/version.txt"), + StandardCharsets.UTF_8); + } catch (IOException e) { + throw new FlywayException("Unable to read extension version: " + e.getMessage(), e); + } + } +} diff --git a/flyway-database-kingbase/src/main/java/org/flywaydb/community/database/kingbase/KingbaseConnection.java b/flyway-database-kingbase/src/main/java/org/flywaydb/community/database/kingbase/KingbaseConnection.java new file mode 100644 index 0000000..cc61127 --- /dev/null +++ b/flyway-database-kingbase/src/main/java/org/flywaydb/community/database/kingbase/KingbaseConnection.java @@ -0,0 +1,58 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-yugabytedb + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ +/* + * Copyright (C) Red Gate Software Ltd 2010-2024 + * + * Licensed 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.flywaydb.community.database.kingbase; + +import org.flywaydb.core.internal.database.base.Schema; +import org.flywaydb.core.internal.database.base.Table; +import org.flywaydb.database.postgresql.PostgreSQLConnection; + +import java.util.concurrent.Callable; + +public class KingbaseConnection extends PostgreSQLConnection { + + KingbaseConnection(KingbaseDatabase database, java.sql.Connection connection) { + super(database, connection); + } + + @Override + public Schema getSchema(String name) { + return new KingbaseSchema(jdbcTemplate, (KingbaseDatabase) database, name); + } + + @Override + public T lock(Table table, Callable callable) { + return new KingbaseExecutionTemplate(jdbcTemplate, table.toString()).execute(callable); + } +} diff --git a/flyway-database-kingbase/src/main/java/org/flywaydb/community/database/kingbase/KingbaseDatabase.java b/flyway-database-kingbase/src/main/java/org/flywaydb/community/database/kingbase/KingbaseDatabase.java new file mode 100644 index 0000000..6e4738a --- /dev/null +++ b/flyway-database-kingbase/src/main/java/org/flywaydb/community/database/kingbase/KingbaseDatabase.java @@ -0,0 +1,111 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-yugabytedb + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ +/* + * Copyright (C) Red Gate Software Ltd 2010-2024 + * + * Licensed 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.flywaydb.community.database.kingbase; + +import lombok.CustomLog; +import org.flywaydb.core.api.configuration.Configuration; +import org.flywaydb.core.internal.database.base.Table; +import org.flywaydb.core.internal.exception.FlywaySqlException; +import org.flywaydb.core.internal.jdbc.JdbcConnectionFactory; +import org.flywaydb.core.internal.jdbc.StatementInterceptor; +import org.flywaydb.database.postgresql.PostgreSQLDatabase; + +import java.sql.Connection; +import java.sql.SQLException; + + +@CustomLog +public class KingbaseDatabase extends PostgreSQLDatabase { + + public static final String LOCK_TABLE_NAME = "YB_FLYWAY_LOCK_TABLE"; + /** + * This table is used to enforce locking through SELECT ... FOR UPDATE on a + * token row inserted in this table. The token row is inserted with the name + * of the Flyway's migration history table as a token for simplicity. + */ + private static final String CREATE_LOCK_TABLE_DDL = "CREATE TABLE IF NOT EXISTS " + LOCK_TABLE_NAME + " (table_name varchar PRIMARY KEY, locked bool)"; + + public KingbaseDatabase(Configuration configuration, JdbcConnectionFactory jdbcConnectionFactory, StatementInterceptor statementInterceptor) { + super(configuration, jdbcConnectionFactory, statementInterceptor); + createLockTable(); + } + + @Override + protected KingbaseConnection doGetConnection(Connection connection) { + return new KingbaseConnection(this, connection); + } + + @Override + public void ensureSupported(Configuration configuration) { + // Checks the Postgres version + ensureDatabaseIsRecentEnough("11.2"); + } + + @Override + public boolean supportsDdlTransactions() { + return false; + } + + @Override + public String getRawCreateScript(Table table, boolean baseline) { + return "CREATE TABLE IF NOT EXISTS " + table + " (\n" + + " \"installed_rank\" INT NOT NULL PRIMARY KEY,\n" + + " \"version\" VARCHAR(50),\n" + + " \"description\" VARCHAR(200) NOT NULL,\n" + + " \"type\" VARCHAR(20) NOT NULL,\n" + + " \"script\" VARCHAR(1000) NOT NULL,\n" + + " \"checksum\" INTEGER,\n" + + " \"installed_by\" VARCHAR(100) NOT NULL,\n" + + " \"installed_on\" TIMESTAMP NOT NULL DEFAULT now(),\n" + + " \"execution_time\" INTEGER NOT NULL,\n" + + " \"success\" BOOLEAN NOT NULL\n" + + ");\n" + + (baseline ? getBaselineStatement(table) + ";\n" : "") + + "CREATE INDEX IF NOT EXISTS \"" + table.getName() + "_s_idx\" ON " + table + " (\"success\");"; + } + + @Override + public boolean useSingleConnection() { + return true; + } + + private void createLockTable() { + try { + jdbcTemplate.execute(CREATE_LOCK_TABLE_DDL); + } catch (SQLException e) { + throw new FlywaySqlException("Unable to initialize the lock table", e); + } + } +} diff --git a/flyway-database-kingbase/src/main/java/org/flywaydb/community/database/kingbase/KingbaseDatabaseType.java b/flyway-database-kingbase/src/main/java/org/flywaydb/community/database/kingbase/KingbaseDatabaseType.java new file mode 100644 index 0000000..37acb85 --- /dev/null +++ b/flyway-database-kingbase/src/main/java/org/flywaydb/community/database/kingbase/KingbaseDatabaseType.java @@ -0,0 +1,102 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-yugabytedb + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ +/* + * Copyright (C) Red Gate Software Ltd 2010-2024 + * + * Licensed 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.flywaydb.community.database.kingbase; + +import org.flywaydb.community.database.KingbaseDatabaseExtension; +import org.flywaydb.core.api.ResourceProvider; +import org.flywaydb.core.api.configuration.Configuration; +import org.flywaydb.core.internal.database.base.CommunityDatabaseType; +import org.flywaydb.core.internal.database.base.Database; +import org.flywaydb.core.internal.jdbc.JdbcConnectionFactory; +import org.flywaydb.core.internal.jdbc.StatementInterceptor; +import org.flywaydb.core.internal.parser.Parser; +import org.flywaydb.core.internal.parser.ParsingContext; +import org.flywaydb.database.postgresql.PostgreSQLDatabaseType; + +import java.sql.Connection; +import java.util.regex.Pattern; + +public class KingbaseDatabaseType extends PostgreSQLDatabaseType implements CommunityDatabaseType { + @Override + public String getName() { + return "Kingbase"; + } + + @Override + public boolean handlesJDBCUrl(String url) { + return url.startsWith("jdbc:kingbase8:") || url.startsWith("jdbc:postgresql:") || url.startsWith("jdbc:p6spy:postgresql:"); + } + + @Override + public int getPriority() { + // Should be checked before plain PostgreSQL + return 1; + } + + @Override + public boolean handlesDatabaseProductNameAndVersion(String databaseProductName, String databaseProductVersion, Connection connection) { + // The YB is what distinguishes Yugabyte + return databaseProductName.startsWith("Kingbase"); + } + + @Override + public Database createDatabase(Configuration configuration, JdbcConnectionFactory jdbcConnectionFactory, StatementInterceptor statementInterceptor) { + return new KingbaseDatabase(configuration, jdbcConnectionFactory, statementInterceptor); + } + + @Override + public Parser createParser(Configuration configuration, ResourceProvider resourceProvider, ParsingContext parsingContext) { + return new KingbaseParser(configuration, parsingContext); + } + + @Override + public String getPluginVersion(Configuration config) { + return KingbaseDatabaseExtension.readVersion(); + } + + /** + * Returns the YugabyteDB Smart driver classname if the smart driver is + * being used. The plugin will work with the Postgresql JDBC driver also + * since the url in that case would start with 'jdbc:postgresql' which would + * return the PG JDBC driver class name. + * @param url + * @param classLoader + * @return "com.yugabyte.Driver" if url starts with "jdbc:yugabytedb:" + */ + @Override + public String getDriverClass(String url, ClassLoader classLoader) { + return url.startsWith("com.kingbase8.Driver") ? "com.kingbase8.Driver" : super.getDriverClass(url, classLoader); + } +} diff --git a/flyway-database-kingbase/src/main/java/org/flywaydb/community/database/kingbase/KingbaseExecutionTemplate.java b/flyway-database-kingbase/src/main/java/org/flywaydb/community/database/kingbase/KingbaseExecutionTemplate.java new file mode 100644 index 0000000..b1a34e1 --- /dev/null +++ b/flyway-database-kingbase/src/main/java/org/flywaydb/community/database/kingbase/KingbaseExecutionTemplate.java @@ -0,0 +1,188 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-yugabytedb + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ +package org.flywaydb.community.database.kingbase; + +import lombok.CustomLog; +import org.flywaydb.core.api.FlywayException; +import org.flywaydb.core.internal.exception.FlywaySqlException; +import org.flywaydb.core.internal.jdbc.JdbcTemplate; +import org.flywaydb.core.internal.strategy.RetryStrategy; +import org.flywaydb.core.internal.util.FlywayDbWebsiteLinks; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.Map; +import java.util.concurrent.Callable; +import java.util.concurrent.ConcurrentHashMap; + +@CustomLog +public class KingbaseExecutionTemplate { + + private final JdbcTemplate jdbcTemplate; + private final String tableName; + private static final Map tableEntries = new ConcurrentHashMap<>(); + + KingbaseExecutionTemplate(JdbcTemplate jdbcTemplate, String tableName) { + this.jdbcTemplate = jdbcTemplate; + this.tableName = tableName; + } + + public T execute(Callable callable) { + Exception error = null; + try { + lock(); + return callable.call(); + } catch (RuntimeException e) { + error = e; + throw e; + } catch (Exception e) { + error = e; + throw new FlywayException(e); + } finally { + unlock(error); + } + } + + private void lock() throws SQLException { + RetryStrategy strategy = new RetryStrategy(); + strategy.doWithRetries(this::tryLock, "Interrupted while attempting to acquire lock through SELECT ... FOR UPDATE", + "Number of retries exceeded while attempting to acquire lock through SELECT ... FOR UPDATE. " + + "Configure the number of retries with the 'lockRetryCount' configuration option: " + FlywayDbWebsiteLinks.LOCK_RETRY_COUNT); + + } + + private boolean tryLock() { + Exception exception = null; + boolean txStarted = false, success = false; + Statement statement = null; + try { + statement = jdbcTemplate.getConnection().createStatement(); + + if (!tableEntries.containsKey(tableName)) { + try { + statement.executeUpdate("INSERT INTO " + + KingbaseDatabase.LOCK_TABLE_NAME + + " VALUES ('" + tableName + "', 'false')"); + tableEntries.put(tableName, true); + LOG.info(Thread.currentThread().getName() + "> Inserted a token row for " + tableName + " in " + KingbaseDatabase.LOCK_TABLE_NAME); + } catch (SQLException e) { + if ("23505".equals(e.getSQLState())) { + // 23505 == UNIQUE_VIOLATION + LOG.debug(Thread.currentThread().getName() + "> Token row already added for " + tableName); + } else { + throw new FlywaySqlException("Could not add token row for " + tableName + " in table " + KingbaseDatabase.LOCK_TABLE_NAME, e); + } + } + } + + boolean locked; + String selectForUpdate = "SELECT locked FROM " + + KingbaseDatabase.LOCK_TABLE_NAME + + " WHERE table_name = '" + + tableName + + "' FOR UPDATE"; + String updateLocked = "UPDATE " + KingbaseDatabase.LOCK_TABLE_NAME + + " SET locked = true WHERE table_name = '" + + tableName + "'"; + + statement.execute("BEGIN"); + txStarted = true; + ResultSet rs = statement.executeQuery(selectForUpdate); + if (rs.next()) { + locked = rs.getBoolean("locked"); + + if (locked) { + statement.execute("COMMIT"); + txStarted = false; + LOG.debug(Thread.currentThread().getName() + "> Another Flyway operation is in progress. Allowing it to complete"); + } else { + LOG.debug(Thread.currentThread().getName() + "> Setting locked = true"); + statement.executeUpdate(updateLocked); + success = true; + } + } else { + // For some reason the record was not found, retry + tableEntries.remove(tableName); + } + + } catch (SQLException e) { + LOG.warn(Thread.currentThread().getName() + "> Unable to perform lock action, SQLState: " + e.getSQLState()); + if (!"40001".equalsIgnoreCase(e.getSQLState())) { + exception = new FlywaySqlException("Unable to perform lock action", e); + throw (FlywaySqlException) exception; + } // else retry + } finally { + if (txStarted) { + try { + statement.execute("COMMIT"); + LOG.debug(Thread.currentThread().getName() + "> Completed the tx to set locked = true"); + } catch (SQLException e) { + if (exception == null) { + throw new FlywaySqlException("Failed to commit the tx to set locked = true", e); + } + LOG.warn(Thread.currentThread().getName() + "> Failed to commit the tx to set locked = true: " + e); + } + } + } + return success; + } + + private void unlock(Exception rethrow) { + Statement statement = null; + try { + statement = jdbcTemplate.getConnection().createStatement(); + statement.execute("BEGIN"); + ResultSet rs = statement.executeQuery("SELECT locked FROM " + KingbaseDatabase.LOCK_TABLE_NAME + " WHERE table_name = '" + tableName + "' FOR UPDATE"); + + if (rs.next()) { + boolean locked = rs.getBoolean("locked"); + if (locked) { + statement.executeUpdate("UPDATE " + KingbaseDatabase.LOCK_TABLE_NAME + " SET locked = false WHERE table_name = '" + tableName + "'"); + } else { + // Unexpected. This may happen only when callable took too long to complete + // and another thread forcefully reset it. + String msg = "Unlock failed but the Flyway operation may have succeeded. Check your Flyway operation before re-trying"; + LOG.warn(Thread.currentThread().getName() + "> " + msg); + if (rethrow == null) { + throw new FlywayException(msg); + } + } + } + } catch (SQLException e) { + if (rethrow == null) { + rethrow = new FlywayException("Unable to perform unlock action", e); + throw (FlywaySqlException) rethrow; + } + LOG.warn("Unable to perform unlock action " + e); + } finally { + try { + statement.execute("COMMIT"); + LOG.debug(Thread.currentThread().getName() + "> Completed the tx to set locked = false"); + } catch (SQLException e) { + if (rethrow == null) { + throw new FlywaySqlException("Failed to commit unlock action", e); + } + LOG.warn("Failed to commit unlock action: " + e); + } + } + } + +} diff --git a/flyway-database-kingbase/src/main/java/org/flywaydb/community/database/kingbase/KingbaseParser.java b/flyway-database-kingbase/src/main/java/org/flywaydb/community/database/kingbase/KingbaseParser.java new file mode 100644 index 0000000..abecfe8 --- /dev/null +++ b/flyway-database-kingbase/src/main/java/org/flywaydb/community/database/kingbase/KingbaseParser.java @@ -0,0 +1,45 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-yugabytedb + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ +/* + * Copyright (C) Red Gate Software Ltd 2010-2024 + * + * Licensed 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.flywaydb.community.database.kingbase; + +import org.flywaydb.core.api.configuration.Configuration; +import org.flywaydb.core.internal.parser.ParsingContext; +import org.flywaydb.database.postgresql.PostgreSQLParser; + +public class KingbaseParser extends PostgreSQLParser { + protected KingbaseParser(Configuration configuration, ParsingContext parsingContext) { + super(configuration, parsingContext); + } +} diff --git a/flyway-database-kingbase/src/main/java/org/flywaydb/community/database/kingbase/KingbaseSchema.java b/flyway-database-kingbase/src/main/java/org/flywaydb/community/database/kingbase/KingbaseSchema.java new file mode 100644 index 0000000..8ea9930 --- /dev/null +++ b/flyway-database-kingbase/src/main/java/org/flywaydb/community/database/kingbase/KingbaseSchema.java @@ -0,0 +1,55 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-yugabytedb + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ +/* + * Copyright (C) Red Gate Software Ltd 2010-2024 + * + * Licensed 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.flywaydb.community.database.kingbase; + +import org.flywaydb.core.internal.database.base.Table; +import org.flywaydb.core.internal.jdbc.JdbcTemplate; +import org.flywaydb.database.postgresql.PostgreSQLSchema; + +public class KingbaseSchema extends PostgreSQLSchema { + /** + * @param jdbcTemplate The Jdbc Template for communicating with the DB. + * @param database The database-specific support. + * @param name The name of the schema. + */ + public KingbaseSchema(JdbcTemplate jdbcTemplate, KingbaseDatabase database, String name) { + super(jdbcTemplate, database, name); + } + + @Override + public Table getTable(String tableName) { + return new KingbaseTable(jdbcTemplate, (KingbaseDatabase) database, this, tableName); + } +} diff --git a/flyway-database-kingbase/src/main/java/org/flywaydb/community/database/kingbase/KingbaseTable.java b/flyway-database-kingbase/src/main/java/org/flywaydb/community/database/kingbase/KingbaseTable.java new file mode 100644 index 0000000..4606604 --- /dev/null +++ b/flyway-database-kingbase/src/main/java/org/flywaydb/community/database/kingbase/KingbaseTable.java @@ -0,0 +1,50 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-yugabytedb + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ +/* + * Copyright (C) Red Gate Software Ltd 2010-2024 + * + * Licensed 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.flywaydb.community.database.kingbase; + +import org.flywaydb.core.internal.jdbc.JdbcTemplate; +import org.flywaydb.database.postgresql.PostgreSQLTable; + +public class KingbaseTable extends PostgreSQLTable { + /** + * @param jdbcTemplate The JDBC template for communicating with the DB. + * @param database The database-specific support. + * @param schema The schema this table lives in. + * @param name The name of the table. + */ + public KingbaseTable(JdbcTemplate jdbcTemplate, KingbaseDatabase database, KingbaseSchema schema, String name) { + super(jdbcTemplate, database, schema, name); + } +} diff --git a/flyway-database-kingbase/src/main/java/org/flywaydb/community/database/kingbase/package-info.java b/flyway-database-kingbase/src/main/java/org/flywaydb/community/database/kingbase/package-info.java new file mode 100644 index 0000000..92aabb9 --- /dev/null +++ b/flyway-database-kingbase/src/main/java/org/flywaydb/community/database/kingbase/package-info.java @@ -0,0 +1,23 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-postgresql + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ +/** + * Private API. No compatibility guarantees provided. + */ +package org.flywaydb.community.database.kingbase; diff --git a/flyway-database-kingbase/src/main/resources/META-INF/services/org.flywaydb.core.extensibility.Plugin b/flyway-database-kingbase/src/main/resources/META-INF/services/org.flywaydb.core.extensibility.Plugin new file mode 100644 index 0000000..e6e25a3 --- /dev/null +++ b/flyway-database-kingbase/src/main/resources/META-INF/services/org.flywaydb.core.extensibility.Plugin @@ -0,0 +1 @@ +org.flywaydb.community.database.kingbase.KingbaseDatabaseType \ No newline at end of file diff --git a/flyway-database-kingbase/src/main/resources/org/flywaydb/community/database/kingbase/version.txt b/flyway-database-kingbase/src/main/resources/org/flywaydb/community/database/kingbase/version.txt new file mode 100644 index 0000000..1785151 --- /dev/null +++ b/flyway-database-kingbase/src/main/resources/org/flywaydb/community/database/kingbase/version.txt @@ -0,0 +1 @@ +${pom.version} \ No newline at end of file diff --git a/flyway-database-oceanbase/src/main/java/org/flywaydb/community/database/OceanBaseDatabaseExtension.java b/flyway-database-oceanbase/src/main/java/org/flywaydb/community/database/OceanBaseDatabaseExtension.java index 83f87f8..c071da0 100644 --- a/flyway-database-oceanbase/src/main/java/org/flywaydb/community/database/OceanBaseDatabaseExtension.java +++ b/flyway-database-oceanbase/src/main/java/org/flywaydb/community/database/OceanBaseDatabaseExtension.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-oceanbase + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * diff --git a/flyway-database-oceanbase/src/main/java/org/flywaydb/community/database/oceanbase/OceanBaseConnection.java b/flyway-database-oceanbase/src/main/java/org/flywaydb/community/database/oceanbase/OceanBaseConnection.java index 7d09cd1..31b61c9 100644 --- a/flyway-database-oceanbase/src/main/java/org/flywaydb/community/database/oceanbase/OceanBaseConnection.java +++ b/flyway-database-oceanbase/src/main/java/org/flywaydb/community/database/oceanbase/OceanBaseConnection.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-oceanbase + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * diff --git a/flyway-database-oceanbase/src/main/java/org/flywaydb/community/database/oceanbase/OceanBaseDatabase.java b/flyway-database-oceanbase/src/main/java/org/flywaydb/community/database/oceanbase/OceanBaseDatabase.java index c5f70e1..7de752f 100644 --- a/flyway-database-oceanbase/src/main/java/org/flywaydb/community/database/oceanbase/OceanBaseDatabase.java +++ b/flyway-database-oceanbase/src/main/java/org/flywaydb/community/database/oceanbase/OceanBaseDatabase.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-oceanbase + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * diff --git a/flyway-database-oceanbase/src/main/java/org/flywaydb/community/database/oceanbase/OceanBaseDatabaseType.java b/flyway-database-oceanbase/src/main/java/org/flywaydb/community/database/oceanbase/OceanBaseDatabaseType.java index 53a6642..1013a3b 100644 --- a/flyway-database-oceanbase/src/main/java/org/flywaydb/community/database/oceanbase/OceanBaseDatabaseType.java +++ b/flyway-database-oceanbase/src/main/java/org/flywaydb/community/database/oceanbase/OceanBaseDatabaseType.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-oceanbase + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * diff --git a/flyway-database-oceanbase/src/main/java/org/flywaydb/community/database/oceanbase/OceanBaseJdbcUtils.java b/flyway-database-oceanbase/src/main/java/org/flywaydb/community/database/oceanbase/OceanBaseJdbcUtils.java index 85f0752..08beb75 100644 --- a/flyway-database-oceanbase/src/main/java/org/flywaydb/community/database/oceanbase/OceanBaseJdbcUtils.java +++ b/flyway-database-oceanbase/src/main/java/org/flywaydb/community/database/oceanbase/OceanBaseJdbcUtils.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-oceanbase + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * diff --git a/flyway-database-oceanbase/src/main/java/org/flywaydb/community/database/oceanbase/package-info.java b/flyway-database-oceanbase/src/main/java/org/flywaydb/community/database/oceanbase/package-info.java index 6ae21ee..fd2417a 100644 --- a/flyway-database-oceanbase/src/main/java/org/flywaydb/community/database/oceanbase/package-info.java +++ b/flyway-database-oceanbase/src/main/java/org/flywaydb/community/database/oceanbase/package-info.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-oceanbase + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * diff --git a/flyway-database-tidb/src/main/java/org/flywaydb/community/database/TiDBDatabaseExtension.java b/flyway-database-tidb/src/main/java/org/flywaydb/community/database/TiDBDatabaseExtension.java index 3e6b0b1..b34ad3a 100644 --- a/flyway-database-tidb/src/main/java/org/flywaydb/community/database/TiDBDatabaseExtension.java +++ b/flyway-database-tidb/src/main/java/org/flywaydb/community/database/TiDBDatabaseExtension.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-tidb + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * diff --git a/flyway-database-tidb/src/main/java/org/flywaydb/community/database/mysql/tidb/TiDBConnection.java b/flyway-database-tidb/src/main/java/org/flywaydb/community/database/mysql/tidb/TiDBConnection.java index 397da64..5d23b89 100644 --- a/flyway-database-tidb/src/main/java/org/flywaydb/community/database/mysql/tidb/TiDBConnection.java +++ b/flyway-database-tidb/src/main/java/org/flywaydb/community/database/mysql/tidb/TiDBConnection.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-tidb + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * @@ -49,4 +68,4 @@ public T lock(Table table, Callable callable) { @Override protected boolean canUseNamedLockTemplate() {return false;} -} \ No newline at end of file +} diff --git a/flyway-database-tidb/src/main/java/org/flywaydb/community/database/mysql/tidb/TiDBDatabase.java b/flyway-database-tidb/src/main/java/org/flywaydb/community/database/mysql/tidb/TiDBDatabase.java index f210177..0ca2bd4 100644 --- a/flyway-database-tidb/src/main/java/org/flywaydb/community/database/mysql/tidb/TiDBDatabase.java +++ b/flyway-database-tidb/src/main/java/org/flywaydb/community/database/mysql/tidb/TiDBDatabase.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-tidb + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * @@ -42,4 +61,4 @@ public void ensureSupported(Configuration configuration) { ensureDatabaseIsRecentEnough("5.0"); recommendFlywayUpgradeIfNecessary("5.0"); } -} \ No newline at end of file +} diff --git a/flyway-database-tidb/src/main/java/org/flywaydb/community/database/mysql/tidb/TiDBDatabaseType.java b/flyway-database-tidb/src/main/java/org/flywaydb/community/database/mysql/tidb/TiDBDatabaseType.java index 8344e56..7404d68 100644 --- a/flyway-database-tidb/src/main/java/org/flywaydb/community/database/mysql/tidb/TiDBDatabaseType.java +++ b/flyway-database-tidb/src/main/java/org/flywaydb/community/database/mysql/tidb/TiDBDatabaseType.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-tidb + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * @@ -53,4 +72,4 @@ public Database createDatabase(Configuration configuration, JdbcConnectionFactor public String getPluginVersion(Configuration config) { return TiDBDatabaseExtension.readVersion(); } -} \ No newline at end of file +} diff --git a/flyway-database-tidb/src/main/java/org/flywaydb/community/database/mysql/tidb/package-info.java b/flyway-database-tidb/src/main/java/org/flywaydb/community/database/mysql/tidb/package-info.java index a506485..b7c5736 100644 --- a/flyway-database-tidb/src/main/java/org/flywaydb/community/database/mysql/tidb/package-info.java +++ b/flyway-database-tidb/src/main/java/org/flywaydb/community/database/mysql/tidb/package-info.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-tidb + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * @@ -16,4 +35,4 @@ /** * Community-supported package. No compatibility guarantees provided. */ -package org.flywaydb.community.database.mysql.tidb; \ No newline at end of file +package org.flywaydb.community.database.mysql.tidb; diff --git a/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/YugabyteDBDatabaseExtension.java b/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/YugabyteDBDatabaseExtension.java index 54920b1..1e3be1f 100644 --- a/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/YugabyteDBDatabaseExtension.java +++ b/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/YugabyteDBDatabaseExtension.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-yugabytedb + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * diff --git a/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/YugabyteDBConnection.java b/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/YugabyteDBConnection.java index a5d517b..835806f 100644 --- a/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/YugabyteDBConnection.java +++ b/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/YugabyteDBConnection.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-yugabytedb + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * @@ -36,4 +55,4 @@ public Schema getSchema(String name) { public T lock(Table table, Callable callable) { return new YugabyteDBExecutionTemplate(jdbcTemplate, table.toString()).execute(callable); } -} \ No newline at end of file +} diff --git a/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/YugabyteDBDatabase.java b/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/YugabyteDBDatabase.java index 50d9ca3..ad2bfa7 100644 --- a/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/YugabyteDBDatabase.java +++ b/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/YugabyteDBDatabase.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-yugabytedb + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * diff --git a/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/YugabyteDBDatabaseType.java b/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/YugabyteDBDatabaseType.java index a45726e..c2146a0 100644 --- a/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/YugabyteDBDatabaseType.java +++ b/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/YugabyteDBDatabaseType.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-yugabytedb + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * @@ -81,4 +100,4 @@ public String getPluginVersion(Configuration config) { public String getDriverClass(String url, ClassLoader classLoader) { return url.startsWith("jdbc:yugabytedb:") ? "com.yugabyte.Driver" : super.getDriverClass(url, classLoader); } -} \ No newline at end of file +} diff --git a/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/YugabyteDBExecutionTemplate.java b/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/YugabyteDBExecutionTemplate.java index 920b487..eb15368 100644 --- a/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/YugabyteDBExecutionTemplate.java +++ b/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/YugabyteDBExecutionTemplate.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-yugabytedb + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ package org.flywaydb.community.database.postgresql.yugabytedb; import lombok.CustomLog; diff --git a/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/YugabyteDBParser.java b/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/YugabyteDBParser.java index 289e698..c0e4b77 100644 --- a/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/YugabyteDBParser.java +++ b/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/YugabyteDBParser.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-yugabytedb + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * @@ -23,4 +42,4 @@ public class YugabyteDBParser extends PostgreSQLParser { protected YugabyteDBParser(Configuration configuration, ParsingContext parsingContext) { super(configuration, parsingContext); } -} \ No newline at end of file +} diff --git a/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/YugabyteDBSchema.java b/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/YugabyteDBSchema.java index 2b9b5f6..17a3214 100644 --- a/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/YugabyteDBSchema.java +++ b/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/YugabyteDBSchema.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-yugabytedb + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * @@ -33,4 +52,4 @@ public YugabyteDBSchema(JdbcTemplate jdbcTemplate, YugabyteDBDatabase database, public Table getTable(String tableName) { return new YugabyteDBTable(jdbcTemplate, (YugabyteDBDatabase) database, this, tableName); } -} \ No newline at end of file +} diff --git a/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/YugabyteDBTable.java b/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/YugabyteDBTable.java index 7d8061a..2dab405 100644 --- a/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/YugabyteDBTable.java +++ b/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/YugabyteDBTable.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-yugabytedb + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * @@ -28,4 +47,4 @@ public class YugabyteDBTable extends PostgreSQLTable { public YugabyteDBTable(JdbcTemplate jdbcTemplate, YugabyteDBDatabase database, YugabyteDBSchema schema, String name) { super(jdbcTemplate, database, schema, name); } -} \ No newline at end of file +} diff --git a/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/package-info.java b/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/package-info.java index a368798..e0bbd5e 100644 --- a/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/package-info.java +++ b/flyway-database-yugabytedb/src/main/java/org/flywaydb/community/database/postgresql/yugabytedb/package-info.java @@ -1,3 +1,22 @@ +/*- + * ========================LICENSE_START================================= + * flyway-database-yugabytedb + * ======================================================================== + * Copyright (C) 2010 - 2024 Red Gate Software Ltd + * ======================================================================== + * Licensed 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. + * =========================LICENSE_END================================== + */ /* * Copyright (C) Red Gate Software Ltd 2010-2024 * @@ -16,4 +35,4 @@ /** * Community-supported package. No compatibility guarantees provided. */ -package org.flywaydb.community.database.postgresql.yugabytedb; \ No newline at end of file +package org.flywaydb.community.database.postgresql.yugabytedb; diff --git a/pom.xml b/pom.xml index 23a9e7a..2db4f6c 100644 --- a/pom.xml +++ b/pom.xml @@ -39,6 +39,7 @@ flyway-database-oceanbase flyway-database-databricks flyway-database-db2zos + flyway-database-kingbase flyway-community-db-support-archetype