online_migrations 0.15.0 → 0.16.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/README.md +10 -6
- data/docs/{background_migrations.md → background_data_migrations.md} +4 -33
- data/docs/background_schema_migrations.md +163 -0
- data/docs/configuring.md +30 -1
- data/lib/generators/online_migrations/templates/create_background_schema_migrations.rb.tt +29 -0
- data/lib/generators/online_migrations/templates/initializer.rb.tt +24 -11
- data/lib/generators/online_migrations/templates/install_migration.rb.tt +24 -0
- data/lib/generators/online_migrations/upgrade_generator.rb +5 -0
- data/lib/online_migrations/application_record.rb +11 -0
- data/lib/online_migrations/background_migrations/config.rb +27 -24
- data/lib/online_migrations/background_migrations/copy_column.rb +1 -4
- data/lib/online_migrations/background_migrations/migration.rb +1 -8
- data/lib/online_migrations/background_migrations/migration_job_runner.rb +1 -1
- data/lib/online_migrations/background_migrations/migration_runner.rb +1 -1
- data/lib/online_migrations/background_schema_migrations/config.rb +40 -0
- data/lib/online_migrations/background_schema_migrations/migration.rb +217 -0
- data/lib/online_migrations/background_schema_migrations/migration_helpers.rb +76 -0
- data/lib/online_migrations/background_schema_migrations/migration_runner.rb +110 -0
- data/lib/online_migrations/background_schema_migrations/migration_status_validator.rb +33 -0
- data/lib/online_migrations/background_schema_migrations/scheduler.rb +30 -0
- data/lib/online_migrations/config.rb +32 -0
- data/lib/online_migrations/schema_statements.rb +1 -0
- data/lib/online_migrations/utils.rb +7 -0
- data/lib/online_migrations/version.rb +1 -1
- data/lib/online_migrations.rb +19 -2
- metadata +12 -4
- data/lib/online_migrations/background_migrations/application_record.rb +0 -13
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: online_migrations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- fatkodima
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -34,19 +34,21 @@ files:
|
|
34
34
|
- CHANGELOG.md
|
35
35
|
- LICENSE.txt
|
36
36
|
- README.md
|
37
|
-
- docs/
|
37
|
+
- docs/background_data_migrations.md
|
38
|
+
- docs/background_schema_migrations.md
|
38
39
|
- docs/configuring.md
|
39
40
|
- lib/generators/online_migrations/background_migration_generator.rb
|
40
41
|
- lib/generators/online_migrations/install_generator.rb
|
41
42
|
- lib/generators/online_migrations/templates/add_sharding_to_online_migrations.rb.tt
|
42
43
|
- lib/generators/online_migrations/templates/background_migration.rb.tt
|
44
|
+
- lib/generators/online_migrations/templates/create_background_schema_migrations.rb.tt
|
43
45
|
- lib/generators/online_migrations/templates/initializer.rb.tt
|
44
46
|
- lib/generators/online_migrations/templates/install_migration.rb.tt
|
45
47
|
- lib/generators/online_migrations/templates/migration.rb.tt
|
46
48
|
- lib/generators/online_migrations/upgrade_generator.rb
|
47
49
|
- lib/online_migrations.rb
|
50
|
+
- lib/online_migrations/application_record.rb
|
48
51
|
- lib/online_migrations/background_migration.rb
|
49
|
-
- lib/online_migrations/background_migrations/application_record.rb
|
50
52
|
- lib/online_migrations/background_migrations/backfill_column.rb
|
51
53
|
- lib/online_migrations/background_migrations/background_migration_class_validator.rb
|
52
54
|
- lib/online_migrations/background_migrations/config.rb
|
@@ -63,6 +65,12 @@ files:
|
|
63
65
|
- lib/online_migrations/background_migrations/perform_action_on_relation.rb
|
64
66
|
- lib/online_migrations/background_migrations/reset_counters.rb
|
65
67
|
- lib/online_migrations/background_migrations/scheduler.rb
|
68
|
+
- lib/online_migrations/background_schema_migrations/config.rb
|
69
|
+
- lib/online_migrations/background_schema_migrations/migration.rb
|
70
|
+
- lib/online_migrations/background_schema_migrations/migration_helpers.rb
|
71
|
+
- lib/online_migrations/background_schema_migrations/migration_runner.rb
|
72
|
+
- lib/online_migrations/background_schema_migrations/migration_status_validator.rb
|
73
|
+
- lib/online_migrations/background_schema_migrations/scheduler.rb
|
66
74
|
- lib/online_migrations/batch_iterator.rb
|
67
75
|
- lib/online_migrations/change_column_type_helpers.rb
|
68
76
|
- lib/online_migrations/command_checker.rb
|
@@ -1,13 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module OnlineMigrations
|
4
|
-
module BackgroundMigrations
|
5
|
-
# Base class for all records used by this gem.
|
6
|
-
#
|
7
|
-
# Can be extended to setup different database where all tables related to
|
8
|
-
# online_migrations will live.
|
9
|
-
class ApplicationRecord < ActiveRecord::Base
|
10
|
-
self.abstract_class = true
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|