commit
b20a635ab0
6 changed files with 29 additions and 5 deletions
|
@ -3,7 +3,7 @@
|
|||
--
|
||||
|
||||
-- Dumped from database version 9.6.5
|
||||
-- Dumped by pg_dump version 9.6.8
|
||||
-- Dumped by pg_dump version 9.6.9
|
||||
|
||||
SET statement_timeout = 0;
|
||||
SET lock_timeout = 0;
|
||||
|
@ -4258,11 +4258,11 @@ INSERT INTO schema_migrations (version) VALUES ('20180202181929');
|
|||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20180213191755');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('201810202124312');
|
||||
INSERT INTO schema_migrations (version) VALUES ('20180214124311');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('201810202124313');
|
||||
INSERT INTO schema_migrations (version) VALUES ('20180215124311');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('201810202124314');
|
||||
INSERT INTO schema_migrations (version) VALUES ('20180216124311');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('201810202124315');
|
||||
INSERT INTO schema_migrations (version) VALUES ('20180217124311');
|
||||
|
||||
|
|
24
spec/migration/migration_sanity_spec.rb
Normal file
24
spec/migration/migration_sanity_spec.rb
Normal file
|
@ -0,0 +1,24 @@
|
|||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'Migration sanity' do
|
||||
|
||||
it 'Migrations have a sane timestamp' do
|
||||
Dir.open(File.join(Rails.root, 'db', 'migrate')) do |dir|
|
||||
#should be a hash but we don't have in Ruby 2.3
|
||||
migration_names = []
|
||||
|
||||
dir.entries.each do |file|
|
||||
if file != '.' && file != '..'
|
||||
ret = file.split('_', 2)
|
||||
expect(ret[0].length).to eq 14
|
||||
expect{ Integer(ret[0])}.to_not raise_error
|
||||
expect(migration_names).to_not include ret[1]
|
||||
|
||||
migration_names.push(ret[1])
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue