-
- Downloads
Increase the string limits for regex fields in push_rules
Contributes to https://gitlab.com/gitlab-org/gitlab/-/issues/423445 **Problem** We have a discrepancy between GitLab database and `db/structure.sql`. GitLab database contains 255 character limit for regex fields. But this limit is missing for self-hosted instances and GDK. **Solution** Recently we added a Rails validation to prevent regex longer than 511 characters (https://gitlab.com/gitlab-org/gitlab/-/merge_requests/128153). We can migrate existing columns to match this limit. It's a three step migration: 1. Add NOT VALID CHECK to verify length of regex fields 2. Validate regex fields 3. Remove any char limits from regex fields Changelog: changed EE: true
Showing
- db/migrate/20230828153646_extend_push_rules_regex_limits.rb 38 additions, 0 deletionsdb/migrate/20230828153646_extend_push_rules_regex_limits.rb
- db/migrate/20230830084959_validate_push_rules_constraints.rb 25 additions, 0 deletionsdb/migrate/20230830084959_validate_push_rules_constraints.rb
- db/migrate/20230830085501_remove_push_rules_regex_limits.rb 17 additions, 0 deletionsdb/migrate/20230830085501_remove_push_rules_regex_limits.rb
- db/schema_migrations/20230828153646 1 addition, 0 deletionsdb/schema_migrations/20230828153646
- db/schema_migrations/20230830084959 1 addition, 0 deletionsdb/schema_migrations/20230830084959
- db/schema_migrations/20230830085501 1 addition, 0 deletionsdb/schema_migrations/20230830085501
- db/structure.sql 8 additions, 1 deletiondb/structure.sql
- ee/spec/requests/api/project_push_rule_spec.rb 2 additions, 2 deletionsee/spec/requests/api/project_push_rule_spec.rb
db/schema_migrations/20230828153646
0 → 100644
db/schema_migrations/20230830084959
0 → 100644
db/schema_migrations/20230830085501
0 → 100644
Please register or sign in to comment