Commit Graph

13547 Commits

Author SHA1 Message Date
Lukas Eder
122c1a3450 [jOOQ/jOOQ#17702] Use more rawtypes in package-private implementation
types to reduce the jar file size of the runtime library
2024-11-29 14:00:36 +01:00
Lukas Eder
6dd976b424 [jOOQ/jOOQ#17696] Diff between interpreted Meta and MetaImpl produces
unnecessary ALTER INDEX .. RENAME statements
2024-11-28 17:16:38 +01:00
Lukas Eder
9fb4a466a7 [jOOQ/jOOQ#17688] Diff should ignore irrelevant CAST on literals in
certain contexts
2024-11-28 16:28:02 +01:00
Lukas Eder
2c84060bed [jOOQ/jOOQ#17689] Excess whitespace rendered in DROP SEQUENCE 2024-11-28 16:01:26 +01:00
Lukas Eder
756d845782 [jOOQ/jOOQ#9506] More work on Migrations API:
- Fix LogPendingMojo name in annotation
- Allow for configuring dialect in Mojos
- Add BaselineMojo
- Add a way to explicitly create a baseline via API
2024-11-28 15:24:51 +01:00
Lukas Eder
77837a966b [jOOQ/jOOQ#17686] Add support for PostgreSQL's STRING_TO_ARRAY and ARRAY_TO_STRING functions 2024-11-28 13:47:40 +01:00
Lukas Eder
a7c9cee82f [jOOQ/jOOQ#9506] Rename Settings.migrationAllowsUndo to migrationAllowUndo 2024-11-28 12:55:13 +01:00
Lukas Eder
82ded123e7 [jOOQ/jOOQ#9506] More work on Migrations API:
- Remove TODO doclink for now. We'll update all the exceptions later
- Rename Settings.migrationAllowsUndo to migrationAllowUndo
- Snapshots are a commercial only feature
- Add Settings.migrationAllowInvalidCommits
- Improve invalid commit exception message
- GitCommitProvider message uncommitted-and-untracked
2024-11-28 11:52:17 +01:00
Lukas Eder
2991aa3824 [jOOQ/jOOQ#17684] Add Javadoc to XJC generated enum types and literals 2024-11-28 10:49:02 +01:00
Lukas Eder
1817dfaf39 [jOOQ/jOOQ#17677] Copy paste error 2024-11-27 17:09:04 +01:00
Lukas Eder
87bdd75cca [jOOQ/jOOQ#17677] Add more context information to "Ambiguous key name"
warning in code generator
2024-11-27 17:03:36 +01:00
Lukas Eder
353149bf9c [jOOQ/jOOQ#9506] Fix NPE arising from exception message 2024-11-27 17:03:22 +01:00
Lukas Eder
800b4e6dd8 [jOOQ/jOOQ#17683] Add an additional code generation flag to turn off many-to-many relationship generation 2024-11-27 16:20:17 +01:00
Lukas Eder
bdec0019fd [jOOQ/jOOQ#17681] Compilation error in generated many-to-many paths when
turning off <implicitJoinPathsToOne/>
2024-11-27 16:07:44 +01:00
Lukas Eder
28073bbaa2 [jOOQ/jOOQ#17677] Add more context information to "Ambiguous key name"
warning in code generator
2024-11-27 15:50:10 +01:00
Lukas Eder
32d6e26f73 [jOOQ/jOOQ#9506] Better error message when doing illegal edits 2024-11-27 14:32:30 +01:00
Lukas Eder
12b590548b [jOOQ/jOOQ#9506] Fix mixing SCRIPT with SCHEMA
A SCRIPT is allowed to modify a schema that is otherwise managed by SCHEMA files. There must be a SCHEMA file documenting the outcome. Other than for that purpose, that SCHEMA file must be ignored, and no diff must be applied from the previously known SCHEMA file.

This currently only works if the SCHEMA and SCRIPT files are contained in the same Commit. It's currently not possible to fix a mistake, where the SCHEMA file has been forgotten, other than to edit the SCRIPT file.
2024-11-27 14:26:03 +01:00
Lukas Eder
ab67f867de [jOOQ/jOOQ#9506] Rename logMigration() to logPending() 2024-11-27 11:30:45 +01:00
Lukas Eder
cf4e705a22 [jOOQ/jOOQ#9506] Fix Javadoc 2024-11-27 10:58:02 +01:00
Lukas Eder
7903638c6f [jOOQ/jOOQ#9506] Rename logMigration() to logPending() 2024-11-27 10:56:46 +01:00
Lukas Eder
8ba74dc91e [jOOQ/jOOQ#9506] More work on Migrations API:
- GitCommitProvider should distinguish between uncommitted (in index) and untracked (not in index)
2024-11-27 10:28:15 +01:00
Lukas Eder
c19df5ff34 [jOOQ/jOOQ#9506] More work on Migrations API:
- Add a Settings.migrationDefaultContentType configuration
- Support special case of SCRIPT only migrations
2024-11-27 10:13:49 +01:00
Lukas Eder
073411a51d [jOOQ/jOOQ#17672] Misleading warning about configured schemas in code generator, when the database doesn't supply any schemata 2024-11-27 08:47:43 +01:00
Lukas Eder
c743b89844 [jOOQ/jOOQ#9506] Fix OSS edition 2024-11-27 08:38:39 +01:00
Lukas Eder
dfb607c1ff [jOOQ/jOOQ#9506] More work on Migrations API:
- Snapshots will be a commercial only feature
- CommitImpl should reject duplicate paths
- Add the ContentType.SCRIPT implementation
- Files.writeString() wasn't available in JDK 8 yet
2024-11-27 07:57:57 +01:00
Lukas Eder
64107cd10c [jOOQ/jOOQ#17670] [jOOQ/jOOQ#17671] Mark property as transient to denote its cache nature 2024-11-26 13:24:57 +01:00
Lukas Eder
db62f6c107
Merge pull request #17670 from ggsurrel/main
Performance improvement in BatchSingle class
2024-11-26 13:22:03 +01:00
Lukas Eder
a822575123 [jOOQ/jOOQ#9506] More work on Migrations API:
- Improved DefaultMigrationContext::toString
- Updated TODO list
- Added migration client info to HISTORY table
- Handle missing decrements
- Throw exception when attempting to decrement a deletion (for now)
- Ignore snapshots when backwards migrating
2024-11-26 13:11:33 +01:00
Guillaume Surrel
daa947f1ce Performance improvement in BatchSingle.java 2024-11-26 11:28:52 +01:00
Lukas Eder
d0cdd0c820 [jOOQ/jOOQ#9506] Replace the term outstanding by pending 2024-11-26 09:26:18 +01:00
Lukas Eder
0a5eaf8788 [jOOQ/jOOQ#9506] Replace the term outstanding by pending 2024-11-26 09:26:08 +01:00
Lukas Eder
b53e0485e1 [jOOQ/jOOQ#17666] Inaccurate Javadoc on ExecuteContext setters 2024-11-26 09:03:01 +01:00
Lukas Eder
c484d10165 [jOOQ/jOOQ#9506] More work on Migrations API:
- Support ContentType.DECREMENT (WIP)
2024-11-25 21:23:57 +01:00
Lukas Eder
af23fa75cb [jOOQ/jOOQ#17665] Diff shouldn't ignore nullable primary keys in dialects that support this 2024-11-25 15:27:58 +01:00
Lukas Eder
20a0070519 [jOOQ/jOOQ#9506] More work on Migrations API:
- Move LogMojo and HistoryMojo logic into org.jooq.Migration
- Reduce log level in FilePattern to DEBUG
- Rename SnapshotMojo to AddSnapshotMojo
- Rename AddMojo to AddUntrackedMojo
- AddUntrackedMojo should append to the file, not overwrite it
- Add fileName property to AddSnapshotMojo and AddUntrackedMojo
- Rename HistoryMojo to LogHistoryMojo
- Add a LogMigrationMojo
- Add a LogUntrackedMojo
2024-11-25 14:56:09 +01:00
Lukas Eder
180a441617 [jOOQ/jOOQ#9506] More work on Migrations API:
- Add History::available
- Allow for updating the root node after all, in order to allow for creating baselines on existing databases
- [jOOQ/jOOQ#17646] Ignore unnamed constraint changes in both directions
- Expose Migration::untracked, publicly
- Add an AddMojo to add untracked files to the migration
2024-11-22 19:25:43 +01:00
Lukas Eder
2cfc3005fc [jOOQ/jOOQ#9506] More work on Migrations API:
- Support ContentType.SNAPSHOT in CommitImpl
- Avoid creating schema in snapshots if it's managed
2024-11-22 15:45:21 +01:00
Lukas Eder
b988c5b5cb [jOOQ/jOOQ#9506] More work on Migrations API:
- Add SnapshotMojo to create snapshots of database versions
- Don't include path in Version::id anymore
2024-11-22 13:43:29 +01:00
Lukas Eder
d0a5e9635c [jOOQ/jOOQ#9506] More work on Migrations API:
- Remove debug info
- Add Commit.valid()
2024-11-22 11:15:00 +01:00
Lukas Eder
cebf801890 [jOOQ/jOOQ#17652] Also, CONSTRAINT_1F_INDEX_7 style indexes 2024-11-22 11:14:30 +01:00
Lukas Eder
45e88c729a [jOOQ/jOOQ#9506] Predicate::not was added in JDK 11 only 2024-11-22 09:37:09 +01:00
Lukas Eder
22b746b012 [jOOQ/jOOQ#17660] DatePart Javadoc should clarify that @Support doesn't
mean the DatePart is supported on all functions
2024-11-22 09:30:06 +01:00
Lukas Eder
dc4a45e59f [jOOQ/jOOQ#17634] Compilation errors in generated POJO code when
generating <immutableInterfaces/> on a table accepting UDTs
2024-11-22 08:54:08 +01:00
Lukas Eder
a38317ab5e [jOOQ/jOOQ#17652] Accept CONSTRAINT_INDEX_ as a possible system index name prefix in H2 2024-11-21 17:16:54 +01:00
Lukas Eder
5fb18bfaf5 [jOOQ/jOOQ#17647] Diff should ignore implicit NOT NULL constraints on
PRIMARY KEY columns
2024-11-21 17:10:52 +01:00
Lukas Eder
b72e6382a8 [jOOQ/jOOQ#9506] Could also be a bug 2024-11-21 16:32:14 +01:00
Lukas Eder
2406f7ec50 [jOOQ/jOOQ#9506] [jOOQ/jOOQ#17646] Diff should ignore constraint changes where (synthetically) named constraint is replaced by an equivalent unnamed constraint.
Users may use unnamed constraints in migration scripts. When comparing the schema with the existing schema in the database, we must ignore the database's synthetic constraint names.
2024-11-21 16:30:45 +01:00
Lukas Eder
6c957454fd [jOOQ/jOOQ#17642] Interpreter should show current query when there's an error 2024-11-21 15:39:21 +01:00
Lukas Eder
1dd1205673 [jOOQ/jOOQ#9506] More work on Migrations API:
- Handling of default schema in MigrationImpl::revertUntrackedQueries
- Use Settings.migrationHistorySchema in revertUntrackedQueries
- Improve logic to filter out history table from revertUntrackedQueries
- Set migration default schema as interpreter search path in History
- Suppress exceptions caused by history record re-insertion in case of
DataMigrationRedoLogException
- VersionImpl should apply CREATE SCHEMA IF NOT EXISTS to on init
- Remove weird initialisation of VersionImpl.meta with interpreter
search path
- Implement DefaultMigrationContext::toString
- Automatically set interpreter search path in Maven plugin
- GitCommitProvider should use same content type subdirs (in plural)
- Add commitProvider property to Maven plugin
- Upgrade jgit
- Allow for configuring a basedir within the GitConfiguration#repository
2024-11-21 15:22:34 +01:00
Lukas Eder
f086212738 [jOOQ/jOOQ#9506] More work on Migrations API:
- Don't throw exceptions in HistoryImpl::toString
- LogMojo should log history as well
- Reuse FilePattern::fileComparator also to sort IDs when loading files
- LogMojo should also include HistoryMojo output
- Make CommitType::getId optional for per-SQL-file metadata usage
2024-11-20 17:04:13 +01:00