Giter Club home page Giter Club logo

liquibase-oracle's Introduction

liquibase-oracle Build and Test Extension

This extension adds Oracle-specific change tags to Liquibase. More details on these can be found in the Liquibase Confluence site, in the Oracle Extensions page.

liquibase-oracle's People

Contributors

alecapp avatar dependabot-preview[bot] avatar dependabot[bot] avatar derkoe avatar filipelautert avatar gillsugeorge avatar github-actions[bot] avatar jandroav avatar jesusfperez avatar jnewton03 avatar kellerj avatar liquibot avatar mcred avatar mikegolod avatar molivasdat avatar nvoxland avatar pmendelson avatar r2-lf avatar stevedonie avatar vershinin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

liquibase-oracle's Issues

dbchangelog-ext.xsd schema is missing definition for MaterializedViewRefreshType

MaterializedViewRefreshType simple type referenced in refreshMaterializedView element definition for refreshType attribute (line 205) is not defined in the schema anywhere. This renders the whole schema invalid.

src-resolve: Cannot resolve the name 'MaterializedViewRefreshType' to a(n) 'simpleType definition' component.
src-resolve: Cannot resolve the name 'MaterializedViewRefreshType' to a(n) 'type definition' component.

┆Issue is synchronized with this Jira Bug by Unito

Add Grant option to ora:grantObjectPermission

It would be nice to have the "grant option" added to grantObjectPermission

<sql>grant select,insert,update,delete on ${tableName} to ${schema} with grant option</sql>

to

<ora:grantObjectPermission recipientList="${schema}" objectName="${tableName}" select="true" insert="true" update="true" delete="true" grant="true"/>

┆Issue is synchronized with this Jira Bug by Unito

Liquibase : Tablespace not coming in the changelog using ant

Hi ,

tablespace attribute is not coming up in the changelog when executing through ant in liquibase 3.6.2.
but it was mentioned that the support to tablespace has been added 3.6.0 in bug fixes release notes as below:
[CORE-1225] - Add support for tablespace assigned to liquibase metadata tables is mentioned in the liquibase 3.6.0 version.

Are we missing any patch?

┆Issue is synchronized with this Jira Bug by Unito

How can we use xinclude in Liquibase XML changlelog?

I am trying to include another xml file which is a fragement of XML file into my changelog. Whenever I execute my changelog in liquibase it gets executed successfully (without any parsing error) but no table is created in the database.

I am not sure we can use xInclude in liquibsae, but I think it should be possible as we are using xml underneath in liquibase. Plus I coulndt find any example of xinclude in liquibase and in offical documentation.

Changelog.xml

<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
	xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
                      http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd"
                       xmlns:xi="http://www.w3c.org/2001/Xinclude">

	<changeSet id="id-1234"
		author="umarTahir">

		<comment>creates table: employee</comment>
		<xi:include
			href="employee.xml" parse="xml"
         xpointer="title"/>

		<rollback>
			<dropTable schemaName="employee_test" tableName="employee" />
		</rollback>
	</changeSet>

</databaseChangeLog>

employee.xml

<createTable tableName="employee" xml:id="title">
	<column name="employee_id" type="UUID">
		<constraints primaryKey="true"
			primaryKeyName="employee_pkey" />
	</column>
	<column name="first_name" type="TEXT" />
	<column name="middle_name" type="TEXT" />
	<column name="last_name" type="TEXT" />
	<column name="email" type="TEXT" />
	<column name="n_created_by" type="TEXT" />
	<column name="n_created" type="TIMESTAMP WITHOUT TIME ZONE" />
	<column name="n_last_modified_by" type="TEXT" />
	<column name="n_last_modified"
		type="TIMESTAMP WITHOUT TIME ZONE" />
</createTable>

┆Issue is synchronized with this Jira Bug by Unito

xsd oracle extension is not visible

Hi,

I'm trying to use liquibase and oracle extension to add a materialized view with "refresh on commit" option

i see several problems:

  • refresh on commit / on demand don't seems to be available as OOTB option in schema
  • xsd extension is in src/main instead of src/resources, which means the schema is not in jar
  • xsd schema namespace is the same than in liquibase core, which is in fact an empty shell. this prevent IDE (IJ) to get a proper completion while i was expecting to add some liquibase-oracle namespace location in my xml root tag
  • is this project still official and following liquibase release ? latest reference to out of date

I can do some PR for this issue, but prior to do this, please confirm it's the right repo to do this and Liquibase is still in the arena with other competitors like Flyway

thanks

┆Issue is synchronized with this Jira Bug by Unito

ora:createTrigger rollback issue

ora:createTrigger seems to have a problem with rollback

the automatic rollback for code containing:

.
IF :new.info IS NULL AND :new.info IS NOT NULL THEN
SELECT info INTO :new.info FROM sp.employees@remote WHERE user_id=:new.REJECTED_BY;
END IF;
.

fails with a message like:
Unexpected error running Liquibase: ORA-00604: error occurred at recursive SQL level 1
ORA-04045: errors during recompilation/revalidation of YYYY.ZZZZ_info_REG_NO
ORA-04052: error occurred when looking up remote object SP.EMPLOYEES@remote
ORA-00604: error occurred at recursive SQL level 3
ORA-02019: connection description for remote database not found

Additionally, explicitly added rollback code appears to be ignored.

drop trigger trigger_name

Medium severity vulnerability CVE-2015-9251 in jquery.min.js version 2.2.4

Hello,

Please let me know if I am in the correct place to open this security issue.

One of our product is using Liquibase and we've just finished the security testing. We have just found out that Liquibase is using an older version of jquery.min.js. Due to medium severity ( CVE-2015-9251 ) jquery should be upgraded to version >=3.0.0. Let me know if major upgrade can be done and wont be a breaking one.

Thanks,

┆Issue is synchronized with this Jira Bug by Unito

ORA-12899: value too large for column "XXX"."DATABASECHANGELOG_EXPORT"."DEP_NAME"

When an object has a lot of dependencies, following ORA-12899 is being raised during "lb genschema"-command. To my opinion it is due the 'DEP-NAME'-column specificiation. It has a specification of VARCHAR2(200).

If I may propose to change this column to a XMLType. When storing these dependencies in an xmltype, this error will never raised. I propose XMLType instead of VARCHAR2, because VARCHAR2 has a limit of 4000 characters (used in a table definition).

See post in the community.

Kind Regards
Olivier

┆Issue is synchronized with this Jira Bug by Unito

schemaName is not allowed on oracle

Hey,

I'm having trouble executing a createTrigger script. It keeps returning following message: "schemaName is not allowed on oracle, ...".
I'm using dbchangelog-3.1.xsd and extention liquibase-oracle-3.0.0.jar against an Oracle XE database.
Strangely it works on another project using liquibases dbchangelog-2.0.xsd (don't know if this has something to do with it). I tried creating the trigger using sqlDeveloper and this works. Is there anything you could think of i'm doing wrong?
I also tried multiple combinations, names, with and without schemaName, but none of them works.

Command line output:
liquibase_failed

Databasechangelog:
databasechangelog

Create trigger changeset example:
vote_id_trigger

Column oracle clob issue

Hello,

With the update table tag, when specify column of type="CLOB" this isn't handled correctly by liquibase and throws error. ORA-01704: string literal too long.
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:62)

e.g:

<changeSet id="id_example" author="spotymydot" runOnChange="true">
    <update tableName="RULES">
        <column name="script" type="CLOB"><![CDATA[

lots of data goes here
]]>

This requires the oracle function to_clob() to be used.

http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions182.htm

This is with the latest 3.2.0 version of liquibase

3.6.x LoadDataChange createSnapshot code path very slow

In 3.6.x the LoadDataChange slows down considerably due the new code that checks for missing columns (see attachment). Is there a way to disable this or make it at least configurable? Without this change loading working properly in 3.5.x.
liquibase-3 6 3-slow-snapshots

┆Issue is synchronized with this Jira Bug by Unito

PL/SQL and SQL script in one sqlFile with liquibase for Oracle

Hello Team,

We are trying to run a Stored procedure and a SQL statement in the same liquibase changeset using Liquibase 3.8.0 and getting below error.

change set


SQL FILE
DECLARE
e_error EXCEPTION;
PRAGMA exception_init ( e_error,-00942 );
BEGIN
EXECUTE IMMEDIATE 'drop table XXXX.AD_GROUP_ROLE_MAPPING';

EXCEPTION
WHEN e_error THEN
NULL;
END;

/
CREATE TABLE XXXX.AD_GROUP_ROLE_MAPPING
(
AD_GROUP_NAME VARCHAR2(200) NOT NULL,
ROLE_ID NUMBER,
PRIMARY KEY (AD_GROUP_NAME)
);
Error
Unexpected error running Liquibase: ORA-06550: line 12, column 2:
PLS-00103: Encountered the symbol "/"
[Failed SQL: (6550) DECLARE
e_error EXCEPTION;
PRAGMA exception_init ( e_error,-00942 );
BEGIN
EXECUTE IMMEDIATE 'drop table XXXX.AD_GROUP_ROLE_MAPPING';

EXCEPTION
WHEN e_error THEN
NULL;
END;

/
Could you please help?

Thanks & Regards
Arif

┆Issue is synchronized with this Jira Bug by Unito

Documentation

Where I can found updated doc? The liquibase.page.seems very outdated.

ora:createTrigger - procedure not preserving line breaks

It seems that the procedure in ora:createTrigger does not preserve line breaks when executing the code.

If the code contains like

stmt1 --- some comment
stmt2

are compiled as
stmt1 --- some comment stmt2

so it is in error when checking in sql developer.

Would it be possible to preserve the line break?

When migrating existing databases to liquibase it is a lot more straight forward if it would.

┆Issue is synchronized with this Jira Bug by Unito

dbunit 2.7.3 breaks extension

After the dependabot PR was merged to upgrade dbunit from 2.7.2 to 2.7.3 the release extension job started to fail:
https://github.com/liquibase/liquibase-oracle/actions/runs/2577971287

Here are the changes:
http://dbunit.sourceforge.net/dbunit/changes-report.html#a2.7.3

This issue should be used to track 2 things:

  1. fixing our dependency issue
  2. updating our pull request action to catch issues like this. The PR was green but obviously had breaking changes.

CC @nvoxland @molivasdat @kevin-atx

Tests are not working

Tests are hardcoded to connect to url jdbc:oracle:thin:@Vagrant:1521:lqbase . This needs to be replaced by a docker instance to allow tests execution.

Compilation fails on Java 16

Compiling on Java 16 (demonstrated in GitHub build action) fails with the following error:

Error:  Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project liquibase-oracle: There are test failures.

┆Issue is synchronized with this Jira Bug by Unito

Unwanted dependency on liquibase-commercial

Since version 4.27.0 liquibase-oracle has a dependency on liquibase-commercial due to changes in liquibase-parent-pom. This forces the dependency on projects that do not use Liquibase Pro. This was found in a project that uses Liquibase on H2 and Oracle databases. If liquibase-oracle and liquibase-commercial are in the classpath together, the execution on a H2 database fails.

I have also created issue liquibase/liquibase-parent-pom#168 on liquibase-parent-pom.

liquibase 3.6.3 with oracle db server version 12

Hello,
problem with oracle server db relase 12.1.0.2 :
When I try a liquibase generate changelog, I get error :
liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: java.sql.SQLException: ORA-28040: No matching authentication protocol.
I use jdbc driver jdbc14.jar as defined in the documentation.

When I try the same commando with a db server release 11.2.0.4, the change is generated without any problem. Does someone have any idea ?

Thanks
Laurent

┆Issue is synchronized with this Jira Bug by Unito

ora: merge doesn't work

Hi,

I have a problem with ora:merge using oracle extension 3.2 and liquibase 3.5.3:
With liquibase 3.4.2 the merge sql is generated in the updateSql file (see test_migrate_3_4_2.sql) however with liquibase 3.5.3 the merge sql is missing from the updateSql file (see test_migrate_3_5_3)

I have run it with following command:

java -jar liquibase.jar --driver=oracle.jdbc.OracleDriver --classpath=c:/liq/ojdbc6-11.2.0.4.0.jar;c:/liq/liquibase-oracle.jar --changeLogFile=C:/liq/xml/master.xml --url="jdbc:oracle:thin:@localhost:1521:xe" --username="sys as sysdba" --password=password --liquibaseSchemaName=TEST_LIQUIBASE --promptForNonLocalDatabase=false --logLevel=info updateSQL -Dschema=TEST > test_migrate.sql

xml_and_sql_files.zip

┆Issue is synchronized with this Jira Bug by Unito

Oracle identity column

I create a table with an ID column
"ADT_ID" NUMBER(19,0) GENERATED BY DEFAULT AS IDENTITY (START with 1 increment by 1),

I then run:

liquibase generateChangeLog

The Change log contains this:

      <column defaultValueComputed="&quot;LIC2_OWNER&quot;.&quot;ISEQ$$_98884&quot;.nextval" name="ADT_ID" remarks="Unique identity number of this audit trail." type="NUMBER(19, 0)">
            <constraints nullable="false"/>

Ideally we should just have metadata - stating identity column and the defaultValueComputed should not be present.

I have looked at the code which generates the SQL from the changeLog and it seems to imply that it should handle the creation of SQL based on the Identity metadata but i have not seen how it extracts this information from the database.

┆Issue is synchronized with this Jira Bug by Unito

Rollback of unnamed check constraint fails

Using a changeset with
<ora:addCheck tableName="LEGI_QUAL"
condition="COMPLEMENTARY IN ( '1', '0' )"
/>
I get a rollback sql statement of:
SQL ALTER TABLE .LEGI_QUAL drop CONSTRAINT null
Which in turn renders an error "Liquibase rollback Failed: liquibase.exception.DatabaseException: Error executing SQL ALTER TABLE .LEGI_QUAL drop CONSTRAINT null: ORA-
02250"
But constraintName is marked as optional in the documentation.

Use of Column type "java.sql.Types.BINARY" results in "ORA-00907: missing right parenthesis"

Hey,

I'm having some trouble when using "java.sql.Types.BINARY" as a column type when creating a table.
I wanted to add a column to store binary data and used it as a solution.
But when executing an update it failes returning message: "... ORA-00907: missing right parenthesis" in my console.
I did some research and found out that using "blob" as a type resolves the error.
But is it the same solution and why does the java.sql.Types.BINARY results in an error?

thanks in advance

oracle package body doesn't execute embedded files

I have a package specification and then a package body. The package body is built current by executing the file in sqlplus which will use the package body as file references allowing for each procedure of the package to be kept in a distinct file. Compile fails because body for pkg after update is the literal file including the @proc1.sql.

Have I missed something that would allow me to build my packages in this manner?


  • directory contents
    • spec.pks
    • body.pkb
    • proc1.sql
    • proc2.sql
create or replace package body pkg
as
    @proc1.sql
    @proc2.sql
end pkg;
/

┆Issue is synchronized with this Jira Bug by Unito

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.