Skip to content

Commit

Permalink
bugfix azure; bugfix build emf version
Browse files Browse the repository at this point in the history
  • Loading branch information
llsand committed Nov 29, 2024
1 parent adf4f16 commit c74fc25
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 6 deletions.
1 change: 1 addition & 0 deletions orcas_core/build_source/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
subprojects
{
project.ext.xtext_version = "2.6.1"
project.ext.emf_version = "2.11.+"

project.group = "com.opitzconsulting.orcas"
project.version = "8.5.2-SNAPSHOT"
Expand Down
5 changes: 5 additions & 0 deletions orcas_core/build_source/extension_build_plugin.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ dependencies
{
compile "org.eclipse.xtext:org.eclipse.xtext.builder.standalone:${project.ext.xtext_version}"
compile "org.eclipse.xtext:org.eclipse.xtext.xtext:${project.ext.xtext_version}"
compile "org.eclipse.emf:org.eclipse.emf.ecore:${project.ext.emf_version}"
compile "org.eclipse.emf:org.eclipse.emf.common:${project.ext.emf_version}"
compile "org.eclipse.emf:org.eclipse.emf.ecore.xmi:${project.ext.emf_version}"
compile "org.eclipse.emf:org.eclipse.emf.codegen.ecore:${project.ext.emf_version}"
compile "org.eclipse.emf:org.eclipse.emf.codegen:${project.ext.emf_version}"
}

class SyncWithDeleteTask extends DefaultTask
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void recreateColumn(StatementBuilder pP, TableDiff pTableDiff, ColumnDiff
pP.addStmt("alter table " + pTableDiff.nameNew + " drop column " + pColumnDiff.nameOld);
pP.addStmt("alter table " + pTableDiff.nameNew + " add " + createColumnCreatePart(pColumnDiff, false));
} else {
pP.addStmt("alter table " + pTableDiff.nameNew + " alter column " + createColumnCreatePart(pColumnDiff, false));
pP.addStmt("alter table " + pTableDiff.nameNew + " alter column " + createColumnCreatePart(pColumnDiff, false, true));
}
}

Expand Down Expand Up @@ -113,11 +113,15 @@ public void dropPrimaryKey(StatementBuilder p, TableDiff pTableDiff, PrimaryKeyD

@Override
protected String createColumnCreatePart(ColumnDiff pColumnDiff, boolean pWithoutNotNull) {
return createColumnCreatePart(pColumnDiff, pWithoutNotNull, false);
}

private String createColumnCreatePart(ColumnDiff pColumnDiff, boolean pWithoutNotNull, boolean pWithoutDefault) {
boolean isVirtual = "virtual".equals(pColumnDiff.virtualNew);

String lReturn = pColumnDiff.nameNew + (isVirtual ? "" : (" " + getColumnDatatype(pColumnDiff)));

if (pColumnDiff.default_valueNew != null) {
if (pColumnDiff.default_valueNew != null && !pWithoutDefault) {
if (isVirtual) {
lReturn = lReturn + " as (" + pColumnDiff.default_valueNew + ")";
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ dependencies
xtextConfiguration project(':orcas_syntax_extensions')
xtextConfiguration "org.eclipse.xtext:org.eclipse.xtext.builder.standalone:${project.ext.xtext_version}"
xtextConfiguration "org.eclipse.xtext:org.eclipse.xtext.xtext:${project.ext.xtext_version}"
xtextConfiguration "org.eclipse.emf:org.eclipse.emf.ecore:${project.ext.emf_version}"
xtextConfiguration "org.eclipse.emf:org.eclipse.emf.common:${project.ext.emf_version}"
xtextConfiguration "org.eclipse.emf:org.eclipse.emf.ecore.xmi:${project.ext.emf_version}"
xtextConfiguration "org.eclipse.emf:org.eclipse.emf.codegen.ecore:${project.ext.emf_version}"
xtextConfiguration "org.eclipse.emf:org.eclipse.emf.codegen:${project.ext.emf_version}"
}

task(build, type: JavaExec)
Expand Down
5 changes: 5 additions & 0 deletions orcas_core/build_source/xtext_generator_build_plugin.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ dependencies
{
compile "org.eclipse.xtext:org.eclipse.xtext.builder.standalone:${project.ext.xtext_version}"
compile "org.eclipse.xtext:org.eclipse.xtext.xtext:${project.ext.xtext_version}"
compile "org.eclipse.emf:org.eclipse.emf.ecore:${project.ext.emf_version}"
compile "org.eclipse.emf:org.eclipse.emf.common:${project.ext.emf_version}"
compile "org.eclipse.emf:org.eclipse.emf.ecore.xmi:${project.ext.emf_version}"
compile "org.eclipse.emf:org.eclipse.emf.codegen.ecore:${project.ext.emf_version}"
compile "org.eclipse.emf:org.eclipse.emf.codegen:${project.ext.emf_version}"
}

task(copyFilesToBuild, type: Copy)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5-bin.zip
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ CREATE TABLE TAB_MOD_COLS
COL_CHG_DEFAULT NUMERIC(15) CONSTRAINT def_test1 DEFAULT 6,
COL_SET_NO_DEFAULT NUMERIC(15) CONSTRAINT def_test2 DEFAULT 5,
COL_SET_BYTE VARCHAR(15) NOT NULL,
COL_SET_CHAR VARCHAR(15) NOT NULL
COL_SET_CHAR VARCHAR(15) NOT NULL,
COL_INC_PRECISION_DEF NUMERIC(3) CONSTRAINT def_test3 DEFAULT 0
);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ CREATE TABLE TAB_MOD_COLS
COL_SET_BYTE VARCHAR(15) NOT NULL,
COL_SET_CHAR VARCHAR(15) NOT NULL,
COL_CHG_SIZE NUMERIC(14) NOT NULL,
COL_CHG_TYPE VARCHAR(15) NOT NULL
COL_CHG_TYPE VARCHAR(15) NOT NULL,
COL_INC_PRECISION_DEF NUMERIC(5,2) CONSTRAINT def_test3 DEFAULT 0
);

CREATE TABLE TAB_DATATYPES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ create table tab_mod_cols
col_chg_default number(15) default "7",
col_set_no_default number(15),
col_set_byte varchar2(15) not null,
col_set_char varchar2(15) not null
col_set_char varchar2(15) not null,
col_inc_precision_def number(5,2) default "0"
);

create table tab_datatypes
Expand Down

0 comments on commit c74fc25

Please sign in to comment.