Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed DbMigration classes (put them in the right place) #3104

Merged
merged 1 commit into from
Jun 13, 2023

Conversation

rPraml
Copy link
Contributor

@rPraml rPraml commented Jun 13, 2023

Hello @rob-bygrave

This PR fixes some issues in the DbMigration/DbMigrationGenerate tests.

There are no changes in production code. It would be great, if this can be merged with priority, as I would need this for further tests related to #3103

Copy link
Contributor Author

@rPraml rPraml left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've checked the generated migration scripts against

  • db2
  • sqlserver19
  • mariadb
  • h2
  • postgres


It is also important, if new models are added, that all table names (also for M2M) are added in the `DbMigrationTest`
cleanup routine.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrote some documentation what is the intention of these tests.
@jonasPoehler FYI

@@ -1,4 +1,4 @@
package misc.migration.v1_0;
package misc.migration.v1_1;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The classes form an earlier test exists only in v1_0
As the directories v1_0 and v1_2 should be equal, I decided to move them to v1_1 instead of copying them

// FIXME: MariaDb produces an invalid quoted statement. We would need to fix quotes here.
// but using reserved names for tables is a bad idea IMHO
// actual: update "table" set textfield = '' where textfield is null;
// expected: update `table` set textfield = '' where textfield is null;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an open issue. I will not address that in this PR
Maybe it will never get fixed, becase giving a table the name table is a bad idea ;)

// Note: tablespaces are currently only supported for DB2
// to be prepared for future (when we support sql server filegroups),
// we allow to specify the DB-platform here
@Tablespace(value = "db2;TSTABLES;", index = "db2;INDEXTS;")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copied from v1_0

@rob-bygrave rob-bygrave merged commit e19cbdc into ebean-orm:master Jun 13, 2023
@rob-bygrave rob-bygrave added this to the 13.19.1 milestone Jun 13, 2023
@rPraml rPraml deleted the dbmigration-fixes branch August 10, 2023 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants