-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minimize merge conflicts Based on: https://github.com/lfittl/activerecord-clean-db-structure - Extract sanitize_migration_timestamps to mysql - Minimize conflicts in schema migrations - Always load the defaults for the current version being tested
- Loading branch information
Showing
9 changed files
with
62 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ PATH | |
PATH | ||
remote: . | ||
specs: | ||
edgestitch (0.3.0) | ||
edgestitch (0.4.0) | ||
|
||
GEM | ||
remote: https://rubygems.org/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ PATH | |
PATH | ||
remote: .. | ||
specs: | ||
edgestitch (0.3.0) | ||
edgestitch (0.4.0) | ||
|
||
GEM | ||
remote: https://rubygems.org/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ PATH | |
PATH | ||
remote: .. | ||
specs: | ||
edgestitch (0.3.0) | ||
edgestitch (0.4.0) | ||
|
||
GEM | ||
remote: https://rubygems.org/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ PATH | |
PATH | ||
remote: .. | ||
specs: | ||
edgestitch (0.3.0) | ||
edgestitch (0.4.0) | ||
|
||
GEM | ||
remote: https://rubygems.org/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module Edgestitch | ||
VERSION = "0.3.0" | ||
VERSION = "0.4.0" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# frozen_string_literal: true | ||
|
||
require "rails_helper" | ||
|
||
RSpec.describe Edgestitch::Mysql::Dump do | ||
describe ".sanitize_migration_timestamps" do | ||
it "breaks the insert down in different lines" do | ||
insert = "INSERT INTO schema_migrations VALUES ('20240102123421'),('20240102223421')," \ | ||
"('20240102323421'),('20240102423421'),('20240102523421');" | ||
|
||
sanitized = Edgestitch::Mysql::Dump.sanitize_migration_timestamps(insert) | ||
|
||
# rubocop:disable Rails/SquishedSQLHeredocs | ||
expect(sanitized).to eql <<~SQL.strip | ||
INSERT INTO schema_migrations VALUES | ||
('20240102123421') | ||
,('20240102223421') | ||
,('20240102323421') | ||
,('20240102423421') | ||
,('20240102523421') | ||
; | ||
SQL | ||
# rubocop:enable Rails/SquishedSQLHeredocs | ||
end | ||
end | ||
end |