strong_migrations 0.7.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +183 -1
- data/LICENSE.txt +1 -1
- data/README.md +385 -164
- data/lib/generators/strong_migrations/install_generator.rb +25 -0
- data/lib/generators/strong_migrations/templates/initializer.rb.tt +10 -3
- data/lib/strong_migrations/adapters/abstract_adapter.rb +76 -0
- data/lib/strong_migrations/adapters/mariadb_adapter.rb +32 -0
- data/lib/strong_migrations/adapters/mysql_adapter.rb +112 -0
- data/lib/strong_migrations/adapters/postgresql_adapter.rb +232 -0
- data/lib/strong_migrations/checker.rb +190 -440
- data/lib/strong_migrations/checks.rb +475 -0
- data/lib/strong_migrations/error_messages.rb +260 -0
- data/lib/strong_migrations/migration.rb +20 -3
- data/lib/strong_migrations/{database_tasks.rb → migration_context.rb} +20 -2
- data/lib/strong_migrations/migrator.rb +21 -0
- data/lib/strong_migrations/safe_methods.rb +123 -0
- data/lib/strong_migrations/schema_dumper.rb +32 -0
- data/lib/strong_migrations/version.rb +1 -1
- data/lib/strong_migrations.rb +46 -203
- data/lib/tasks/strong_migrations.rake +2 -7
- metadata +17 -83
- data/lib/strong_migrations/alphabetize_columns.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e155e036c26788c7c9fa7f513131422b784b895fe1cbfdfc8052ad1f5233cd6c
|
4
|
+
data.tar.gz: 5fe21cada2e29c433313c686332d96c67e2c55d057fd6c68839fe1993307c0f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f40abaf84f10ce6ce7255d083b3ec0940c2f7380705857767b0cde56b23802dcf844c27251c634006559dfb4489b799ab3758bf9928b6cb57b6bceb1bf051ec
|
7
|
+
data.tar.gz: c283b8b93715a4aabd2c0e8dc15b022e45ebfbe3bb52fccc037b9c95d3b2279d6002b78354cab8600cf2972f96a6966af0fd80aa9b58cde53343b5035d8bc59c
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,185 @@
|
|
1
|
+
## 2.2.0 (2025-02-01)
|
2
|
+
|
3
|
+
- Fixed constraint name for long table and column names with `change_column_null`
|
4
|
+
- Dropped support for Active Record < 7
|
5
|
+
|
6
|
+
## 2.1.0 (2024-11-08)
|
7
|
+
|
8
|
+
- Added `skip_database` method
|
9
|
+
- Added experimental `remove_invalid_indexes` option
|
10
|
+
- Added warning for unsupported adapters
|
11
|
+
- Improved output for `db:forward`, `db:rollback`, `db:migrate:up`, and `db:migrate:down`
|
12
|
+
- Made operations more retriable with `safe_by_default`
|
13
|
+
|
14
|
+
## 2.0.2 (2024-10-30)
|
15
|
+
|
16
|
+
- Fixed migrations not running with Active Record 8 rc2
|
17
|
+
|
18
|
+
## 2.0.1 (2024-10-14)
|
19
|
+
|
20
|
+
- Fixed issue with `alphabetize_schema` and virtual columns
|
21
|
+
|
22
|
+
## 2.0.0 (2024-06-28)
|
23
|
+
|
24
|
+
- Improved install generator for Trilogy
|
25
|
+
- Fixed charset check for MariaDB 11.4
|
26
|
+
- Dropped support for Ruby < 3.1 and Active Record < 6.1
|
27
|
+
- Dropped support for Postgres < 12, MySQL < 8.0, and MariaDB < 10.5
|
28
|
+
|
29
|
+
## 1.8.0 (2024-03-11)
|
30
|
+
|
31
|
+
- Added check for `add_column` with auto-incrementing columns
|
32
|
+
- Updated instructions for removing a column to append to `ignored_columns`
|
33
|
+
- Fixed check for adding a column with a default value for MySQL and MariaDB
|
34
|
+
|
35
|
+
## 1.7.0 (2024-01-05)
|
36
|
+
|
37
|
+
- Added check for `add_unique_constraint`
|
38
|
+
|
39
|
+
## 1.6.4 (2023-10-17)
|
40
|
+
|
41
|
+
- Fixed false positives with `revert`
|
42
|
+
|
43
|
+
## 1.6.3 (2023-09-20)
|
44
|
+
|
45
|
+
- Added support for Trilogy
|
46
|
+
|
47
|
+
## 1.6.2 (2023-09-13)
|
48
|
+
|
49
|
+
- Fixed foreign key options with `add_reference` and `safe_by_default`
|
50
|
+
- Fixed `safety_assured` with `revert`
|
51
|
+
|
52
|
+
## 1.6.1 (2023-08-09)
|
53
|
+
|
54
|
+
- Fixed `safety_assured` for custom checks with `safe_by_default`
|
55
|
+
|
56
|
+
## 1.6.0 (2023-07-22)
|
57
|
+
|
58
|
+
- Added check for `change_column_default`
|
59
|
+
|
60
|
+
## 1.5.0 (2023-07-02)
|
61
|
+
|
62
|
+
- Added check for `add_column` with stored generated columns
|
63
|
+
- Fixed `add_reference` with `foreign_key` and `index: false`
|
64
|
+
|
65
|
+
## 1.4.4 (2023-03-08)
|
66
|
+
|
67
|
+
- Fixed `add_foreign_key` with `name` and `column` options with `safe_by_default`
|
68
|
+
|
69
|
+
## 1.4.3 (2023-02-19)
|
70
|
+
|
71
|
+
- Fixed check for `change_column` to account for charset with MySQL and MariaDB
|
72
|
+
|
73
|
+
## 1.4.2 (2023-01-29)
|
74
|
+
|
75
|
+
- Added `alphabetize_schema` option
|
76
|
+
|
77
|
+
## 1.4.1 (2023-01-05)
|
78
|
+
|
79
|
+
- Added support for multiple databases to `target_version`
|
80
|
+
|
81
|
+
## 1.4.0 (2022-10-31)
|
82
|
+
|
83
|
+
- Added check for `add_exclusion_constraint`
|
84
|
+
- Added support for `RACK_ENV`
|
85
|
+
- Fixed error when `Rails` defined without `Rails.env`
|
86
|
+
- Fixed error with `change_column_null` when table does not exist
|
87
|
+
|
88
|
+
## 1.3.2 (2022-10-09)
|
89
|
+
|
90
|
+
- Improved error message for `add_column` with `default: nil` with Postgres 10
|
91
|
+
|
92
|
+
## 1.3.1 (2022-09-21)
|
93
|
+
|
94
|
+
- Fixed check for `add_column` with `default: nil` with Postgres 10
|
95
|
+
|
96
|
+
## 1.3.0 (2022-08-30)
|
97
|
+
|
98
|
+
- Added check for `add_column` with `uuid` type and volatile default value
|
99
|
+
|
100
|
+
## 1.2.0 (2022-06-10)
|
101
|
+
|
102
|
+
- Added check for index corruption with Postgres 14.0 to 14.3
|
103
|
+
|
104
|
+
## 1.1.0 (2022-06-08)
|
105
|
+
|
106
|
+
- Added check for `force` option with `create_join_table`
|
107
|
+
- Improved errors for extra arguments
|
108
|
+
- Fixed ignoring extra arguments with `safe_by_default`
|
109
|
+
- Fixed missing options with `remove_index` and `safe_by_default`
|
110
|
+
|
111
|
+
## 1.0.0 (2022-03-21)
|
112
|
+
|
113
|
+
New safe operations with MySQL and MariaDB
|
114
|
+
|
115
|
+
- Setting `NOT NULL` on an existing column with strict mode enabled
|
116
|
+
|
117
|
+
New safe operations with Postgres
|
118
|
+
|
119
|
+
- Changing between `text` and `citext` when not indexed
|
120
|
+
- Changing a `string` column to a `citext` column when not indexed
|
121
|
+
- Changing a `citext` column to a `string` column with no `:limit` when not indexed
|
122
|
+
- Changing a `cidr` column to an `inet` column
|
123
|
+
- Increasing `:precision` of an `interval` or `time` column
|
124
|
+
|
125
|
+
New unsafe operations with Postgres
|
126
|
+
|
127
|
+
- Adding a column with a callable default value
|
128
|
+
- Decreasing `:precision` of a `datetime` column
|
129
|
+
- Decreasing `:limit` of a `timestamptz` column
|
130
|
+
- Passing a default value to `change_column_null`
|
131
|
+
|
132
|
+
Other
|
133
|
+
|
134
|
+
- Added experimental support for lock timeout retries
|
135
|
+
- Added `target_sql_mode` option
|
136
|
+
- Added error for `change_column_null` with default value with `safe_by_default` option
|
137
|
+
- Fixed instructions for `remove_columns` with options
|
138
|
+
- Dropped support for Postgres < 10, MySQL < 5.7, and MariaDB < 10.2
|
139
|
+
|
140
|
+
## 0.8.0 (2022-02-09)
|
141
|
+
|
142
|
+
- Fixed error with versioned schema with Active Record 7.0.2+
|
143
|
+
- Dropped support for Ruby < 2.6 and Active Record < 5.2
|
144
|
+
|
145
|
+
## 0.7.9 (2021-12-15)
|
146
|
+
|
147
|
+
- Fixed error with multiple databases with Active Record 7
|
148
|
+
|
149
|
+
## 0.7.8 (2021-08-03)
|
150
|
+
|
151
|
+
- Fixed issue with `add_reference ..., foreign_key: {to_table: ...}` with `safe_by_default`
|
152
|
+
|
153
|
+
## 0.7.7 (2021-06-07)
|
154
|
+
|
155
|
+
- Removed timeouts and `auto_analyze` from schema load
|
156
|
+
|
157
|
+
## 0.7.6 (2021-01-17)
|
158
|
+
|
159
|
+
- Fixed `NOT NULL` constraint check for quoted columns
|
160
|
+
- Fixed deprecation warning with Active Record 6.1
|
161
|
+
|
162
|
+
## 0.7.5 (2021-01-12)
|
163
|
+
|
164
|
+
- Added checks for `add_check_constraint` and `validate_check_constraint`
|
165
|
+
|
166
|
+
## 0.7.4 (2020-12-16)
|
167
|
+
|
168
|
+
- Added `safe_by_default` option to install generator
|
169
|
+
- Fixed warnings with Active Record 6.1
|
170
|
+
|
171
|
+
## 0.7.3 (2020-11-24)
|
172
|
+
|
173
|
+
- Added `safe_by_default` option
|
174
|
+
|
175
|
+
## 0.7.2 (2020-10-25)
|
176
|
+
|
177
|
+
- Added support for float timeouts
|
178
|
+
|
179
|
+
## 0.7.1 (2020-07-27)
|
180
|
+
|
181
|
+
- Added `target_version` option to replace database-specific options
|
182
|
+
|
1
183
|
## 0.7.0 (2020-07-22)
|
2
184
|
|
3
185
|
- Added `check_down` option
|
@@ -101,7 +283,7 @@
|
|
101
283
|
## 0.2.2 (2018-02-14)
|
102
284
|
|
103
285
|
- Friendlier output
|
104
|
-
- Better method of hooking into
|
286
|
+
- Better method of hooking into Active Record
|
105
287
|
|
106
288
|
## 0.2.1 (2018-02-07)
|
107
289
|
|
data/LICENSE.txt
CHANGED