File tree Expand file tree Collapse file tree
src/main/java/org/breedinginsight/db/migration Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,8 +78,12 @@ private void addConstraint(Context context) throws SQLException {
7878
7979 // Add new constraint
8080 try (Statement altTable = context .getConnection ().createStatement ()) {
81+ // NOTE: because Java-based migrations don't run at build time, they end up running last (out of order) on
82+ // application startup. If they haven't been applied to the database already. For that reason, the reference
83+ // to column `orcid` was changed to `oauth_id` 2025-08-25 to allow this migration to run after
84+ // V1.34.0__rename-orcid.sql.
8185 String sql = "ALTER TABLE bi_user\n " +
82- "ADD CONSTRAINT " +CONSTRAINT_NAME + " CHECK ( (email IS NOT NULL ) OR (orcid IS NULL) ) ;" ;
86+ "ADD CONSTRAINT " +CONSTRAINT_NAME + " CHECK ( (email IS NOT NULL ) OR (oauth_id IS NULL) ) ;" ;
8387 log .debug (sql );
8488 altTable .executeUpdate (sql );
8589 }
You can’t perform that action at this time.
0 commit comments