Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/activerecord-clean-db-structure/clean_dump.rb
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def order_column_definitions
# NOTE: does not work for SMALLSERIAL
def sequences_cleanup
dump.gsub!(/^ id integer NOT NULL(,)?$/, ' id SERIAL\1')
dump.gsub!(/^ id bigint NOT NULL(,)?$/, ' id BIGSERIAL\1')
dump.gsub!(/^ id bigint (?:CONSTRAINT [\w_]+?_not_null )?NOT NULL(,)?$/, ' id BIGSERIAL\1')
dump.gsub!(
/^CREATE SEQUENCE [\w\.]+_id_seq\s+(AS integer\s+)?START WITH 1\s+INCREMENT BY 1\s+NO MINVALUE\s+NO MAXVALUE\s+CACHE 1;$/, ''
)
Expand Down