strong_migrations 0.6.8 → 1.6.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 +141 -0
- data/LICENSE.txt +1 -1
- data/README.md +349 -108
- data/lib/generators/strong_migrations/install_generator.rb +29 -0
- data/lib/generators/strong_migrations/templates/initializer.rb.tt +10 -3
- data/lib/strong_migrations/adapters/abstract_adapter.rb +77 -0
- data/lib/strong_migrations/adapters/mariadb_adapter.rb +32 -0
- data/lib/strong_migrations/adapters/mysql_adapter.rb +107 -0
- data/lib/strong_migrations/adapters/postgresql_adapter.rb +230 -0
- data/lib/strong_migrations/checker.rb +125 -403
- data/lib/strong_migrations/checks.rb +483 -0
- data/lib/strong_migrations/database_tasks.rb +2 -1
- data/lib/strong_migrations/error_messages.rb +250 -0
- data/lib/strong_migrations/migration.rb +10 -2
- data/lib/strong_migrations/migrator.rb +19 -0
- data/lib/strong_migrations/railtie.rb +0 -4
- data/lib/strong_migrations/safe_methods.rb +128 -0
- data/lib/strong_migrations/schema_dumper.rb +21 -0
- data/lib/strong_migrations/version.rb +1 -1
- data/lib/strong_migrations.rb +40 -185
- data/lib/tasks/strong_migrations.rake +2 -13
- metadata +20 -82
- 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: f84ebb54319b6d614f0908355239495e937676836e4dfaad26e0dc343f091343
|
4
|
+
data.tar.gz: 9b5dc06db468b4ce8f5d3460267b185e2e6c69df236c65bfb74ddcd5b04b3546
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3371f6b39b1c870efa5d2bc0737041ce3b1139c9f6a47e6018636007526ba437746917fee26721123ce17376a67829cd25c79fc9a8c29f2257f54189de314a9
|
7
|
+
data.tar.gz: 9ad328fd87f0d32d071235a5425443b378b35cfb4ab5546fb768f9a92f3bd808baf316764b03b9b7aa315cc1c0b41e60b8857bb08def411665ee7832e7f24068
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,144 @@
|
|
1
|
+
## 1.6.1 (2023-08-09)
|
2
|
+
|
3
|
+
- Fixed `safety_assured` for custom checks with `safe_by_default`
|
4
|
+
|
5
|
+
## 1.6.0 (2023-07-22)
|
6
|
+
|
7
|
+
- Added check for `change_column_default`
|
8
|
+
|
9
|
+
## 1.5.0 (2023-07-02)
|
10
|
+
|
11
|
+
- Added check for `add_column` with stored generated columns
|
12
|
+
- Fixed `add_reference` with `foreign_key` and `index: false`
|
13
|
+
|
14
|
+
## 1.4.4 (2023-03-08)
|
15
|
+
|
16
|
+
- Fixed `add_foreign_key` with `name` and `column` options with `safe_by_default`
|
17
|
+
|
18
|
+
## 1.4.3 (2023-02-19)
|
19
|
+
|
20
|
+
- Fixed check for `change_column` to account for charset with MySQL and MariaDB
|
21
|
+
|
22
|
+
## 1.4.2 (2023-01-29)
|
23
|
+
|
24
|
+
- Added `alphabetize_schema` option
|
25
|
+
|
26
|
+
## 1.4.1 (2023-01-05)
|
27
|
+
|
28
|
+
- Added support for multiple databases to `target_version`
|
29
|
+
|
30
|
+
## 1.4.0 (2022-10-31)
|
31
|
+
|
32
|
+
- Added check for `add_exclusion_constraint`
|
33
|
+
- Added support for `RACK_ENV`
|
34
|
+
- Fixed error when `Rails` defined without `Rails.env`
|
35
|
+
- Fixed error with `change_column_null` when table does not exist
|
36
|
+
|
37
|
+
## 1.3.2 (2022-10-09)
|
38
|
+
|
39
|
+
- Improved error message for `add_column` with `default: nil` with Postgres 10
|
40
|
+
|
41
|
+
## 1.3.1 (2022-09-21)
|
42
|
+
|
43
|
+
- Fixed check for `add_column` with `default: nil` with Postgres 10
|
44
|
+
|
45
|
+
## 1.3.0 (2022-08-30)
|
46
|
+
|
47
|
+
- Added check for `add_column` with `uuid` type and volatile default value
|
48
|
+
|
49
|
+
## 1.2.0 (2022-06-10)
|
50
|
+
|
51
|
+
- Added check for index corruption with Postgres 14.0 to 14.3
|
52
|
+
|
53
|
+
## 1.1.0 (2022-06-08)
|
54
|
+
|
55
|
+
- Added check for `force` option with `create_join_table`
|
56
|
+
- Improved errors for extra arguments
|
57
|
+
- Fixed ignoring extra arguments with `safe_by_default`
|
58
|
+
- Fixed missing options with `remove_index` and `safe_by_default`
|
59
|
+
|
60
|
+
## 1.0.0 (2022-03-21)
|
61
|
+
|
62
|
+
New safe operations with MySQL and MariaDB
|
63
|
+
|
64
|
+
- Setting `NOT NULL` on an existing column with strict mode enabled
|
65
|
+
|
66
|
+
New safe operations with Postgres
|
67
|
+
|
68
|
+
- Changing between `text` and `citext` when not indexed
|
69
|
+
- Changing a `string` column to a `citext` column when not indexed
|
70
|
+
- Changing a `citext` column to a `string` column with no `:limit` when not indexed
|
71
|
+
- Changing a `cidr` column to an `inet` column
|
72
|
+
- Increasing `:precision` of an `interval` or `time` column
|
73
|
+
|
74
|
+
New unsafe operations with Postgres
|
75
|
+
|
76
|
+
- Adding a column with a callable default value
|
77
|
+
- Decreasing `:precision` of a `datetime` column
|
78
|
+
- Decreasing `:limit` of a `timestamptz` column
|
79
|
+
- Passing a default value to `change_column_null`
|
80
|
+
|
81
|
+
Other
|
82
|
+
|
83
|
+
- Added experimental support for lock timeout retries
|
84
|
+
- Added `target_sql_mode` option
|
85
|
+
- Added error for `change_column_null` with default value with `safe_by_default` option
|
86
|
+
- Fixed instructions for `remove_columns` with options
|
87
|
+
- Dropped support for Postgres < 10, MySQL < 5.7, and MariaDB < 10.2
|
88
|
+
|
89
|
+
## 0.8.0 (2022-02-09)
|
90
|
+
|
91
|
+
- Fixed error with versioned schema with Active Record 7.0.2+
|
92
|
+
- Dropped support for Ruby < 2.6 and Active Record < 5.2
|
93
|
+
|
94
|
+
## 0.7.9 (2021-12-15)
|
95
|
+
|
96
|
+
- Fixed error with multiple databases with Active Record 7
|
97
|
+
|
98
|
+
## 0.7.8 (2021-08-03)
|
99
|
+
|
100
|
+
- Fixed issue with `add_reference ..., foreign_key: {to_table: ...}` with `safe_by_default`
|
101
|
+
|
102
|
+
## 0.7.7 (2021-06-07)
|
103
|
+
|
104
|
+
- Removed timeouts and `auto_analyze` from schema load
|
105
|
+
|
106
|
+
## 0.7.6 (2021-01-17)
|
107
|
+
|
108
|
+
- Fixed `NOT NULL` constraint check for quoted columns
|
109
|
+
- Fixed deprecation warning with Active Record 6.1
|
110
|
+
|
111
|
+
## 0.7.5 (2021-01-12)
|
112
|
+
|
113
|
+
- Added checks for `add_check_constraint` and `validate_check_constraint`
|
114
|
+
|
115
|
+
## 0.7.4 (2020-12-16)
|
116
|
+
|
117
|
+
- Added `safe_by_default` option to install generator
|
118
|
+
- Fixed warnings with Active Record 6.1
|
119
|
+
|
120
|
+
## 0.7.3 (2020-11-24)
|
121
|
+
|
122
|
+
- Added `safe_by_default` option
|
123
|
+
|
124
|
+
## 0.7.2 (2020-10-25)
|
125
|
+
|
126
|
+
- Added support for float timeouts
|
127
|
+
|
128
|
+
## 0.7.1 (2020-07-27)
|
129
|
+
|
130
|
+
- Added `target_version` option to replace database-specific options
|
131
|
+
|
132
|
+
## 0.7.0 (2020-07-22)
|
133
|
+
|
134
|
+
- Added `check_down` option
|
135
|
+
- Added check for `change_column` with `null: false`
|
136
|
+
- Added check for `validate_foreign_key`
|
137
|
+
- Improved error messages
|
138
|
+
- Made auto analyze less verbose in Postgres
|
139
|
+
- Decreasing the length limit of a `varchar` column or adding a limit is not safe in Postgres
|
140
|
+
- Removed safety checks for `db` rake tasks (Rails 5+ handles this)
|
141
|
+
|
1
142
|
## 0.6.8 (2020-05-13)
|
2
143
|
|
3
144
|
- `change_column_null` on a column with a `NOT NULL` constraint is safe in Postgres 12+
|
data/LICENSE.txt
CHANGED