ridgepole 0.9.6 → 1.0.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/Appraisals +4 -0
- data/CHANGELOG.md +238 -0
- data/README.md +12 -148
- data/bin/ridgepole +1 -1
- data/docker-compose.yml +26 -18
- data/gemfiles/activerecord_7.0.gemfile +7 -0
- data/lib/ridgepole/diff.rb +4 -1
- data/lib/ridgepole/execute_expander.rb +4 -1
- data/lib/ridgepole/version.rb +1 -1
- data/ridgepole.gemspec +1 -1
- metadata +7 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dd3d82e112d8ef525a7a909538e864b1dc6b4d1b6eaabad978e2ec552962fd63
|
|
4
|
+
data.tar.gz: 76dcd540c7ae97d1c226077f2b09979fa16e9937ec8a8d8d9f81b001bcdb2ee2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f641654487c60639c6de8633cba4ee8d3dc55a52b200ee43857f670a818c6699ba4271de56616152b8d378aac2c0e1eee118c17aa362c2e5e451542e5be540c3
|
|
7
|
+
data.tar.gz: b502738eb29e65a73e03dc0d64cec03cb250227c319888d65c7869bb123166fbd6354a9accfb25072484ed50e4bbbccd98e674b89dad51618341284bc8c1aeed
|
data/Appraisals
CHANGED
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.0 (2021/12/19)
|
|
4
|
+
|
|
5
|
+
* Support Rails 7.0
|
|
6
|
+
* `--skip-drop-table` by default ([pull#363](https://github.com/winebarrel/ridgepole/pull/363))
|
|
7
|
+
|
|
8
|
+
## 0.9
|
|
9
|
+
|
|
10
|
+
### 0.9.6
|
|
11
|
+
|
|
12
|
+
* Fix malformed error ([pull#362](https://github.com/winebarrel/ridgepole/pull/362))
|
|
13
|
+
|
|
14
|
+
### 0.9.5
|
|
15
|
+
|
|
16
|
+
* Call `super` in `disable_table_options.rb` ([pull#357](https://github.com/winebarrel/ridgepole/pull/357))
|
|
17
|
+
|
|
18
|
+
### 0.9.4
|
|
19
|
+
|
|
20
|
+
* Fix `--alter-extra` option for unique index ([pull#356](https://github.com/winebarrel/ridgepole/pull/356))
|
|
21
|
+
|
|
22
|
+
### 0.9.3
|
|
23
|
+
|
|
24
|
+
* Fix `limit` option for `t.integer` ([pull#354](https://github.com/winebarrel/ridgepole/pull/354))
|
|
25
|
+
|
|
26
|
+
### 0.9.2
|
|
27
|
+
|
|
28
|
+
* Support `t.column index option` ([pull#353](https://github.com/winebarrel/ridgepole/pull/353))
|
|
29
|
+
|
|
30
|
+
### 0.9.1
|
|
31
|
+
|
|
32
|
+
* Support `t.foreign_key` ([pull#348](https://github.com/winebarrel/ridgepole/pull/348))
|
|
33
|
+
|
|
34
|
+
### 0.9.0
|
|
35
|
+
|
|
36
|
+
* Remove `--mysql-use-alter` option ([pull#330](https://github.com/winebarrel/ridgepole/pull/330))
|
|
37
|
+
* Add `--table-hash-options` option ([pull#331](https://github.com/winebarrel/ridgepole/pull/331))
|
|
38
|
+
* Support Rails 6.1 ([pull#323](https://github.com/winebarrel/ridgepole/pull/323))
|
|
39
|
+
* Disable Rails 5.0 support ([pull#335](https://github.com/winebarrel/ridgepole/pull/335))
|
|
40
|
+
* Fix PK AUTO_INCREMENT change bug ([pull#334](https://github.com/winebarrel/ridgepole/pull/334))
|
|
41
|
+
|
|
42
|
+
## 0.8
|
|
43
|
+
|
|
44
|
+
### 0.8.13
|
|
45
|
+
|
|
46
|
+
* Support `serial` and `bigserial` column types ([pull#321](https://github.com/winebarrel/ridgepole/pull/321))
|
|
47
|
+
|
|
48
|
+
### 0.8.12
|
|
49
|
+
|
|
50
|
+
* Pluralize column specified by `references` ([pull#317](https://github.com/winebarrel/ridgepole/pull/317))
|
|
51
|
+
|
|
52
|
+
### 0.8.11
|
|
53
|
+
|
|
54
|
+
* Fix FK index check support multiple PK ([pull#315](https://github.com/winebarrel/ridgepole/pull/315))
|
|
55
|
+
* Support t.reference() foreign_key option ([pull#316](https://github.com/winebarrel/ridgepole/pull/316))
|
|
56
|
+
|
|
57
|
+
### 0.8.10
|
|
58
|
+
|
|
59
|
+
* Raise an error if an InnoDB column has a foreign key but no index ([pull#310](https://github.com/winebarrel/ridgepole/pull/310))
|
|
60
|
+
|
|
61
|
+
### 0.8.9
|
|
62
|
+
|
|
63
|
+
* Fix unexpected differences on text types and blob types on Rails 6 ([pull#306](https://github.com/winebarrel/ridgepole/pull/306))
|
|
64
|
+
* Fix unexpected warning when a foreign key is added on the primary key ([pull#307](https://github.com/winebarrel/ridgepole/pull/307))
|
|
65
|
+
|
|
66
|
+
### 0.8.8
|
|
67
|
+
|
|
68
|
+
* Fix keyword arguments warnings in Ruby 2.7 ([pull#303](https://github.com/winebarrel/ridgepole/pull/303))
|
|
69
|
+
|
|
70
|
+
### 0.8.7
|
|
71
|
+
|
|
72
|
+
* Support `require_relative` ([pull#298](https://github.com/winebarrel/ridgepole/pull/298))
|
|
73
|
+
|
|
74
|
+
### 0.8.6
|
|
75
|
+
|
|
76
|
+
* Support multiple databases feature ([pull#297](https://github.com/winebarrel/ridgepole/pull/297))
|
|
77
|
+
|
|
78
|
+
### 0.8.5
|
|
79
|
+
|
|
80
|
+
* Improve warning message on table options ([pull#291](https://github.com/winebarrel/ridgepole/pull/291))
|
|
81
|
+
|
|
82
|
+
### 0.8.4
|
|
83
|
+
|
|
84
|
+
* Display a warning if an InnoDB table doesn't have any indexes on a column where it has a foreign key ([pull#290](https://github.com/winebarrel/ridgepole/pull/290))
|
|
85
|
+
|
|
86
|
+
### 0.8.3
|
|
87
|
+
|
|
88
|
+
* Fix "topological sort failed" error ([pull#287](https://github.com/winebarrel/ridgepole/pull/287))
|
|
89
|
+
|
|
90
|
+
### 0.8.2
|
|
91
|
+
|
|
92
|
+
* Support `postgres://` schema ([pull#285](https://github.com/winebarrel/ridgepole/pull/285))
|
|
93
|
+
|
|
94
|
+
### 0.8.1
|
|
95
|
+
|
|
96
|
+
* Drop tables in an order considering foreign key constraints ([pull#284](https://github.com/winebarrel/ridgepole/pull/284))
|
|
97
|
+
|
|
98
|
+
### 0.8.0
|
|
99
|
+
|
|
100
|
+
* Support Rails 6.0
|
|
101
|
+
|
|
102
|
+
## 0.7
|
|
103
|
+
|
|
104
|
+
### 0.7.8
|
|
105
|
+
|
|
106
|
+
* Fix for `add_foreign_key(..., column: ,,,)` ([pull#278](https://github.com/winebarrel/ridgepole/pull/278))
|
|
107
|
+
|
|
108
|
+
### 0.7.7
|
|
109
|
+
|
|
110
|
+
* Support URI query string ([pull#273](https://github.com/winebarrel/ridgepole/pull/273))
|
|
111
|
+
|
|
112
|
+
### 0.7.6
|
|
113
|
+
|
|
114
|
+
* Fix database url check ([pull#266](https://github.com/winebarrel/ridgepole/pull/266))
|
|
115
|
+
* Add ignore option ([pull#267](https://github.com/winebarrel/ridgepole/pull/267))
|
|
116
|
+
|
|
117
|
+
### 0.7.5
|
|
118
|
+
|
|
119
|
+
* Fix polymorphic options ([pull#263](https://github.com/winebarrel/ridgepole/pull/263))
|
|
120
|
+
* Fix `--mysql-use-alter` option ([pull#246](https://github.com/winebarrel/ridgepole/pull/264))
|
|
121
|
+
* Fix Database URI parsing ([pull#265](https://github.com/winebarrel/ridgepole/pull/265))
|
|
122
|
+
|
|
123
|
+
### 0.7.4
|
|
124
|
+
|
|
125
|
+
* Fix `add_foreign_key` options ([issue#250](https://github.com/winebarrel/ridgepole/issues/250))
|
|
126
|
+
|
|
127
|
+
### 0.7.3
|
|
128
|
+
|
|
129
|
+
* Add `--mysql-change-table-comment option` ([pull#166](https://github.com/winebarrel/ridgepole/pull/166))
|
|
130
|
+
* Refactoring with RuboCop
|
|
131
|
+
* Support primary key adding/dropping ([issue#246](https://github.com/winebarrel/ridgepole/issues/246))
|
|
132
|
+
|
|
133
|
+
### 0.7.2
|
|
134
|
+
|
|
135
|
+
* Support Rails 5.2
|
|
136
|
+
|
|
137
|
+
### 0.7.1
|
|
138
|
+
|
|
139
|
+
* Remove `--reverse` option
|
|
140
|
+
* Add `--allow-pk-change` option
|
|
141
|
+
* Add `--create-table-with-index` option
|
|
142
|
+
* Add `--mysql-dump-auto-increment` option (`rails >= 5.1`)
|
|
143
|
+
|
|
144
|
+
### 0.7.0
|
|
145
|
+
|
|
146
|
+
* Remove Rails 4.x support
|
|
147
|
+
* Add Rails 5.1 support
|
|
148
|
+
* Remove `--enable-mysql-awesome` option
|
|
149
|
+
* Add `--skip-drop-table` option
|
|
150
|
+
* Support foreign key without name
|
|
151
|
+
* Support MySQL JSON Type and Generated Columns
|
|
152
|
+
* Add `--mysql-change-table-options` option
|
|
153
|
+
* Pass config from env
|
|
154
|
+
* Fix change fk order
|
|
155
|
+
* Add `--check-relation-type` option
|
|
156
|
+
* Add `--skip-column-comment-change` option
|
|
157
|
+
* Add `--default-bigint-limit` option
|
|
158
|
+
* Add `--ignore-table-comment` option
|
|
159
|
+
|
|
160
|
+
## 0.6
|
|
161
|
+
|
|
162
|
+
### 0.6.6
|
|
163
|
+
|
|
164
|
+
* Use `t.column` for migration ([pull#114](https://github.com/winebarrel/ridgepole/pull/114))
|
|
165
|
+
* Support DATABASE_URL format ([pull#118](https://github.com/winebarrel/ridgepole/pull/118))
|
|
166
|
+
* Add Ruby2.4 CI ([pull#119](https://github.com/winebarrel/ridgepole/pull/119))
|
|
167
|
+
|
|
168
|
+
### 0.6.5
|
|
169
|
+
|
|
170
|
+
* Fix rails version `'>= 4.2', '< 6'`
|
|
171
|
+
* Support new types ([pull#84](https://github.com/winebarrel/ridgepole/pull/84))
|
|
172
|
+
* Support `default: -> { ... }` ([pull#85](https://github.com/winebarrel/ridgepole/pull/85))
|
|
173
|
+
* Support DDL Comment (Rails5 only)
|
|
174
|
+
* Output schema diff when pass `--verbose`
|
|
175
|
+
* Support composite primary key (Rails5 only / [pull#97](https://github.com/winebarrel/ridgepole/pull/97))
|
|
176
|
+
|
|
177
|
+
### 0.6.4
|
|
178
|
+
|
|
179
|
+
* Execute sql using external script ([pull#56](https://github.com/winebarrel/ridgepole/pull/56))
|
|
180
|
+
* Add `--mysql-use-alter` option
|
|
181
|
+
* Add `--alter-extra` option
|
|
182
|
+
* Add `--dump-with-default-fk-name` option
|
|
183
|
+
* Support `t.index` ([pull#64](https://github.com/winebarrel/ridgepole/pull/64))
|
|
184
|
+
* Remove migration_comments
|
|
185
|
+
* Fix foreign key apply order
|
|
186
|
+
|
|
187
|
+
### 0.6.3
|
|
188
|
+
|
|
189
|
+
* Fix `default` option ([pull#48](https://github.com/winebarrel/ridgepole/pull/48))
|
|
190
|
+
* Add `--enable-migration-comments` option ([pull#50](https://github.com/winebarrel/ridgepole/pull/50))
|
|
191
|
+
* Disable `rename_table_indexes`
|
|
192
|
+
|
|
193
|
+
### 0.6.1
|
|
194
|
+
|
|
195
|
+
* Support [PostgreSQL columns](https://github.com/winebarrel/rails/blob/v4.2.1/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb#L79)
|
|
196
|
+
|
|
197
|
+
### 0.6.0
|
|
198
|
+
|
|
199
|
+
* Fix rails version `~> 4.2.1`
|
|
200
|
+
* Disable following libraries support:
|
|
201
|
+
* activerecord-mysql-unsigned
|
|
202
|
+
* migration_comments
|
|
203
|
+
* foreigner
|
|
204
|
+
* Disable sqlite support
|
|
205
|
+
* Add PostgreSQL test
|
|
206
|
+
* Remove `--mysql-awesome-unsigned-pk` option
|
|
207
|
+
|
|
208
|
+
## 0.5
|
|
209
|
+
|
|
210
|
+
### 0.5.2
|
|
211
|
+
|
|
212
|
+
* Add `--enable-mysql-awesome` option ([activerecord-mysql-awesome](https://github.com/kamipo/activerecord-mysql-awesome) is required `>= 0.0.3`)
|
|
213
|
+
* It is not possible to enable both `--enable-mysql-awesome` and `--enable-migration-comments`, `--enable-mysql-awesome` and `--enable-mysql-unsigned`, `--enable-mysql-awesome` and `--enable-mysql-pkdump`
|
|
214
|
+
* Fix foreigner version `<= 1.7.1`
|
|
215
|
+
|
|
216
|
+
### 0.5.1
|
|
217
|
+
|
|
218
|
+
* Add `--enable-migration-comments` option ([migration_comments](https://github.com/pinnymz/migration_comments) is required)
|
|
219
|
+
* Fix rails version `< 4.2.0`
|
|
220
|
+
|
|
221
|
+
### 0.5.0
|
|
222
|
+
|
|
223
|
+
* Fix `activerecord-mysql-unsigned` version: `~> 0.3.1`
|
|
224
|
+
|
|
225
|
+
## 0.4
|
|
226
|
+
|
|
227
|
+
### 0.4.12
|
|
228
|
+
|
|
229
|
+
* Fix `activerecord-mysql-unsigned` version: `~> 0.2.0`
|
|
230
|
+
|
|
231
|
+
### 0.4.11
|
|
232
|
+
|
|
233
|
+
* Add `--enable-mysql-pkdump` option.
|
|
234
|
+
|
|
235
|
+
### 0.4.8
|
|
236
|
+
|
|
237
|
+
* `activerecord-mysql-unsigned` is now optional. Please pass `--enable-mysql-unsigned` after you install [activerecord-mysql-unsigned](https://github.com/waka/activerecord-mysql-unsigned) if you want to use.
|
|
238
|
+
* Please pass `--enable-foreigner` after you install [foreigner](https://github.com/matthuhiggins/foreigner) if you want to use the foreign key.
|
data/README.md
CHANGED
|
@@ -6,156 +6,20 @@ It defines DB schema using [Rails DSL](http://guides.rubyonrails.org/migrations.
|
|
|
6
6
|
(like Chef/Puppet)
|
|
7
7
|
|
|
8
8
|
[](http://badge.fury.io/rb/ridgepole)
|
|
9
|
-
[ if you want to use.
|
|
16
|
-
* Please pass `--enable-foreigner` after you install [foreigner](https://github.com/matthuhiggins/foreigner) if you want to use the foreign key.
|
|
17
|
-
* `>= 0.4.11`
|
|
18
|
-
* Add `--enable-mysql-pkdump` option.
|
|
19
|
-
* `>= 0.4.12`
|
|
20
|
-
* Fix `activerecord-mysql-unsigned` version: `~> 0.2.0`
|
|
21
|
-
* `>= 0.5.0`
|
|
22
|
-
* Fix `activerecord-mysql-unsigned` version: `~> 0.3.1`
|
|
23
|
-
* `>= 0.5.1`
|
|
24
|
-
* Add `--enable-migration-comments` option ([migration_comments](https://github.com/pinnymz/migration_comments) is required)
|
|
25
|
-
* Fix rails version `< 4.2.0`
|
|
26
|
-
* `>= 0.5.2`
|
|
27
|
-
* Add `--enable-mysql-awesome` option ([activerecord-mysql-awesome](https://github.com/kamipo/activerecord-mysql-awesome) is required `>= 0.0.3`)
|
|
28
|
-
* It is not possible to enable both `--enable-mysql-awesome` and `--enable-migration-comments`, `--enable-mysql-awesome` and `--enable-mysql-unsigned`, `--enable-mysql-awesome` and `--enable-mysql-pkdump`
|
|
29
|
-
* Fix foreigner version `<= 1.7.1`
|
|
30
|
-
* `>= 0.6.0`
|
|
31
|
-
* Fix rails version `~> 4.2.1`
|
|
32
|
-
* Disable following libraries support:
|
|
33
|
-
* activerecord-mysql-unsigned
|
|
34
|
-
* migration_comments
|
|
35
|
-
* foreigner
|
|
36
|
-
* Disable sqlite support
|
|
37
|
-
* Add PostgreSQL test
|
|
38
|
-
* Remove `--mysql-awesome-unsigned-pk` option
|
|
39
|
-
* `>= 0.6.1`
|
|
40
|
-
* Support [PostgreSQL columns](https://github.com/winebarrel/rails/blob/v4.2.1/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb#L79)
|
|
41
|
-
* `>= 0.6.3`
|
|
42
|
-
* Fix `default` option ([pull#48](https://github.com/winebarrel/ridgepole/pull/48))
|
|
43
|
-
* Add `--enable-migration-comments` option ([pull#50](https://github.com/winebarrel/ridgepole/pull/50))
|
|
44
|
-
* Disable `rename_table_indexes`
|
|
45
|
-
* `>= 0.6.4`
|
|
46
|
-
* Execute sql using external script ([pull#56](https://github.com/winebarrel/ridgepole/pull/56))
|
|
47
|
-
* Add `--mysql-use-alter` option
|
|
48
|
-
* Add `--alter-extra` option
|
|
49
|
-
* Add `--dump-with-default-fk-name` option
|
|
50
|
-
* Support `t.index` ([pull#64](https://github.com/winebarrel/ridgepole/pull/64))
|
|
51
|
-
* Remove migration_comments
|
|
52
|
-
* Fix foreign key apply order
|
|
53
|
-
* `>= 0.6.5`
|
|
54
|
-
* Fix rails version `'>= 4.2', '< 6'`
|
|
55
|
-
* Support new types ([pull#84](https://github.com/winebarrel/ridgepole/pull/84))
|
|
56
|
-
* Support `default: -> { ... }` ([pull#85](https://github.com/winebarrel/ridgepole/pull/85))
|
|
57
|
-
* Support DDL Comment (Rails5 only)
|
|
58
|
-
* Output schema diff when pass `--verbose`
|
|
59
|
-
* Support composite primary key (Rails5 only / [pull#97](https://github.com/winebarrel/ridgepole/pull/97))
|
|
60
|
-
* `>= 0.6.6`
|
|
61
|
-
* Use `t.column` for migration ([pull#114](https://github.com/winebarrel/ridgepole/pull/114))
|
|
62
|
-
* Support DATABASE_URL format ([pull#118](https://github.com/winebarrel/ridgepole/pull/118))
|
|
63
|
-
* Add Ruby2.4 CI ([pull#119](https://github.com/winebarrel/ridgepole/pull/119))
|
|
64
|
-
* `>= 0.7.0`
|
|
65
|
-
* Remove Rails 4.x support
|
|
66
|
-
* Add Rails 5.1 support
|
|
67
|
-
* Remove `--enable-mysql-awesome` option
|
|
68
|
-
* Add `--skip-drop-table` option
|
|
69
|
-
* Support foreign key without name
|
|
70
|
-
* Support MySQL JSON Type and Generated Columns
|
|
71
|
-
* Add `--mysql-change-table-options` option
|
|
72
|
-
* Pass config from env
|
|
73
|
-
* Fix change fk order
|
|
74
|
-
* Add `--check-relation-type` option
|
|
75
|
-
* Add `--skip-column-comment-change` option
|
|
76
|
-
* Add `--default-bigint-limit` option
|
|
77
|
-
* Add `--ignore-table-comment` option
|
|
78
|
-
* `>= 0.7.1`
|
|
79
|
-
* Remove `--reverse` option
|
|
80
|
-
* Add `--allow-pk-change` option
|
|
81
|
-
* Add `--create-table-with-index` option
|
|
82
|
-
* Add `--mysql-dump-auto-increment` option (`rails >= 5.1`)
|
|
83
|
-
* `>= 0.7.2`
|
|
84
|
-
* Support Rails 5.2
|
|
85
|
-
* `>= 0.7.3`
|
|
86
|
-
* Add `--mysql-change-table-comment option` ([pull#166](https://github.com/winebarrel/ridgepole/pull/166))
|
|
87
|
-
* Refactoring with RuboCop
|
|
88
|
-
* Support primary key adding/dropping ([issue#246](https://github.com/winebarrel/ridgepole/issues/246))
|
|
89
|
-
* `>= 0.7.4`
|
|
90
|
-
* Fix `add_foreign_key` options ([issue#250](https://github.com/winebarrel/ridgepole/issues/250))
|
|
91
|
-
* `>= 0.7.5`
|
|
92
|
-
* Fix polymorphic options ([pull#263](https://github.com/winebarrel/ridgepole/pull/263))
|
|
93
|
-
* Fix `--mysql-use-alter` option ([pull#246](https://github.com/winebarrel/ridgepole/pull/264))
|
|
94
|
-
* Fix Database URI parsing ([pull#265](https://github.com/winebarrel/ridgepole/pull/265))
|
|
95
|
-
* `>= 0.7.6`
|
|
96
|
-
* Fix database url check ([pull#266](https://github.com/winebarrel/ridgepole/pull/266))
|
|
97
|
-
* Add ignore option ([pull#267](https://github.com/winebarrel/ridgepole/pull/267))
|
|
98
|
-
* `>= 0.7.7`
|
|
99
|
-
* Support URI query string ([pull#273](https://github.com/winebarrel/ridgepole/pull/273))
|
|
100
|
-
* `>= 0.7.8`
|
|
101
|
-
* Fix for `add_foreign_key(..., column: ,,,)` ([pull#278](https://github.com/winebarrel/ridgepole/pull/278))
|
|
102
|
-
* `>= 0.8.0`
|
|
103
|
-
* Support Rails 6.0
|
|
104
|
-
* `>= 0.8.1`
|
|
105
|
-
* Drop tables in an order considering foreign key constraints ([pull#284](https://github.com/winebarrel/ridgepole/pull/284))
|
|
106
|
-
* `>= 0.8.2`
|
|
107
|
-
* Support `postgres://` schema ([pull#285](https://github.com/winebarrel/ridgepole/pull/285))
|
|
108
|
-
* `>= 0.8.3`
|
|
109
|
-
* Fix "topological sort failed" error ([pull#287](https://github.com/winebarrel/ridgepole/pull/287))
|
|
110
|
-
* `>= 0.8.4`
|
|
111
|
-
* Display a warning if an InnoDB table doesn't have any indexes on a column where it has a foreign key ([pull#290](https://github.com/winebarrel/ridgepole/pull/290))
|
|
112
|
-
* `>= 0.8.5`
|
|
113
|
-
* Improve warning message on table options ([pull#291](https://github.com/winebarrel/ridgepole/pull/291))
|
|
114
|
-
* `>= 0.8.6`
|
|
115
|
-
* Support multiple databases feature ([pull#297](https://github.com/winebarrel/ridgepole/pull/297))
|
|
116
|
-
* `>= 0.8.7`
|
|
117
|
-
* Support `require_relative` ([pull#298](https://github.com/winebarrel/ridgepole/pull/298))
|
|
118
|
-
* `>= 0.8.8`
|
|
119
|
-
* Fix keyword arguments warnings in Ruby 2.7 ([pull#303](https://github.com/winebarrel/ridgepole/pull/303))
|
|
120
|
-
* `>= 0.8.9`
|
|
121
|
-
* Fix unexpected differences on text types and blob types on Rails 6 ([pull#306](https://github.com/winebarrel/ridgepole/pull/306))
|
|
122
|
-
* Fix unexpected warning when a foreign key is added on the primary key ([pull#307](https://github.com/winebarrel/ridgepole/pull/307))
|
|
123
|
-
* `>= 0.8.10`
|
|
124
|
-
* Raise an error if an InnoDB column has a foreign key but no index ([pull#310](https://github.com/winebarrel/ridgepole/pull/310))
|
|
125
|
-
* `>= 0.8.11`
|
|
126
|
-
* Fix FK index check support multiple PK ([pull#315](https://github.com/winebarrel/ridgepole/pull/315))
|
|
127
|
-
* Support t.reference() foreign_key option ([pull#316](https://github.com/winebarrel/ridgepole/pull/316))
|
|
128
|
-
* `>= 0.8.12`
|
|
129
|
-
* Pluralize column specified by `references` ([pull#317](https://github.com/winebarrel/ridgepole/pull/317))
|
|
130
|
-
* `>= 0.8.13`
|
|
131
|
-
* Support `serial` and `bigserial` column types ([pull#321](https://github.com/winebarrel/ridgepole/pull/321))
|
|
132
|
-
* `>= 0.9.0`
|
|
133
|
-
* Remove `--mysql-use-alter` option ([pull#330](https://github.com/winebarrel/ridgepole/pull/330))
|
|
134
|
-
* Add `--table-hash-options` option ([pull#331](https://github.com/winebarrel/ridgepole/pull/331))
|
|
135
|
-
* Support Rails 6.1 ([pull#323](https://github.com/winebarrel/ridgepole/pull/323))
|
|
136
|
-
* Disable Rails 5.0 support ([pull#335](https://github.com/winebarrel/ridgepole/pull/335))
|
|
137
|
-
* Fix PK AUTO_INCREMENT change bug ([pull#334](https://github.com/winebarrel/ridgepole/pull/334))
|
|
138
|
-
* `>= 0.9.1`
|
|
139
|
-
* Support `t.foreign_key` ([pull#348](https://github.com/winebarrel/ridgepole/pull/348))
|
|
140
|
-
* `>= 0.9.2`
|
|
141
|
-
* Support `t.column index option` ([pull#353](https://github.com/winebarrel/ridgepole/pull/353))
|
|
142
|
-
* `>= 0.9.3`
|
|
143
|
-
* Fix `limit` option for `t.integer` ([pull#354](https://github.com/winebarrel/ridgepole/pull/354))
|
|
144
|
-
* `>= 0.9.4`
|
|
145
|
-
* Fix `--alter-extra` option for unique index ([pull#356](https://github.com/winebarrel/ridgepole/pull/356))
|
|
146
|
-
* `>= 0.9.5`
|
|
147
|
-
* Call `super` in `disable_table_options.rb` ([pull#357](https://github.com/winebarrel/ridgepole/pull/357))
|
|
148
|
-
* `>= 0.9.6`
|
|
149
|
-
* Fix malformed error ([pull#362](https://github.com/winebarrel/ridgepole/pull/362))
|
|
150
|
-
</details>
|
|
9
|
+
[](https://github.com/winebarrel/ridgepole/actions)
|
|
10
|
+
[](https://coveralls.io/github/winebarrel/ridgepole?branch=1.0)
|
|
151
11
|
|
|
152
12
|
**Notice**
|
|
153
13
|
|
|
154
|
-
ActiveRecord 6.1 is supported in ridgepole v0.9, but the ActiveRecord dump has been changed, so there is a difference between ActiveRecord 5.x/6.0 format.
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
14
|
+
* ActiveRecord 6.1 is supported in ridgepole v0.9, but the ActiveRecord dump has been changed, so there is a difference between ActiveRecord 5.x/6.0 format.
|
|
15
|
+
* **If you use ActiveRecord 6.1, please modify Schemafile format**.
|
|
16
|
+
* cf. https://github.com/winebarrel/ridgepole/pull/323
|
|
17
|
+
* `DROP TABLE` is skipped by default in v1.0 and later versions.
|
|
18
|
+
* If you want to `DROP TABLE`, please pass `--drop-table`.
|
|
19
|
+
* cf. https://github.com/ridgepole/ridgepole/pull/363
|
|
20
|
+
* In Rails 7.0, the output of dumper is different from Rails 6.
|
|
21
|
+
* cf. https://github.com/rails/rails/issues/43909
|
|
22
|
+
* cf. https://github.com/rails/rails/commit/c2a6f618d22cca4d9b7be7fa7652e7aac509350c#diff-55f41513f027a3d219629f475f03c2d1105ca55c5093d691e1b3dc4710c6cc0b
|
|
159
23
|
|
|
160
24
|
## Installation
|
|
161
25
|
|
|
@@ -206,7 +70,7 @@ Usage: ridgepole [options]
|
|
|
206
70
|
--dump-without-table-options
|
|
207
71
|
--dump-with-default-fk-name
|
|
208
72
|
--index-removed-drop-column
|
|
209
|
-
--
|
|
73
|
+
--drop-table
|
|
210
74
|
--mysql-change-table-options
|
|
211
75
|
--mysql-change-table-comment
|
|
212
76
|
--check-relation-type DEF_PK
|
data/bin/ridgepole
CHANGED
|
@@ -137,7 +137,7 @@ ARGV.options do |opt|
|
|
|
137
137
|
opt.on('', '--dump-without-table-options') { options[:dump_without_table_options] = true }
|
|
138
138
|
opt.on('', '--dump-with-default-fk-name') { options[:dump_with_default_fk_name] = true }
|
|
139
139
|
opt.on('', '--index-removed-drop-column') { options[:index_removed_drop_column] = true }
|
|
140
|
-
opt.on('', '--
|
|
140
|
+
opt.on('', '--drop-table') { options[:force_drop_table] = true }
|
|
141
141
|
opt.on('', '--mysql-change-table-options') { options[:mysql_change_table_options] = true }
|
|
142
142
|
opt.on('', '--mysql-change-table-comment') { options[:mysql_change_table_comment] = true }
|
|
143
143
|
opt.on('', '--check-relation-type DEF_PK') { |v| options[:check_relation_type] = v }
|
data/docker-compose.yml
CHANGED
|
@@ -1,18 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
version: "3.8"
|
|
2
|
+
services:
|
|
3
|
+
mysql:
|
|
4
|
+
image: "mysql:5.6"
|
|
5
|
+
ports:
|
|
6
|
+
- "13316:3306"
|
|
7
|
+
environment:
|
|
8
|
+
MYSQL_ROOT_PASSWORD: password
|
|
9
|
+
mysql57:
|
|
10
|
+
image: "mysql:5.7"
|
|
11
|
+
ports:
|
|
12
|
+
- "13317:3306"
|
|
13
|
+
environment:
|
|
14
|
+
MYSQL_ROOT_PASSWORD: password
|
|
15
|
+
mysql80:
|
|
16
|
+
image: "mysql:8.0"
|
|
17
|
+
ports:
|
|
18
|
+
- "13318:3306"
|
|
19
|
+
environment:
|
|
20
|
+
MYSQL_ROOT_PASSWORD: password
|
|
21
|
+
postgres:
|
|
22
|
+
image: "postgres:14"
|
|
23
|
+
ports:
|
|
24
|
+
- "15442:5432"
|
|
25
|
+
environment:
|
|
26
|
+
POSTGRES_PASSWORD: password
|
data/lib/ridgepole/diff.rb
CHANGED
|
@@ -41,7 +41,7 @@ module Ridgepole
|
|
|
41
41
|
|
|
42
42
|
scan_relation_info(relation_info)
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
if !@options[:merge] && @options[:force_drop_table]
|
|
45
45
|
from.each do |table_name, from_attrs|
|
|
46
46
|
next unless target?(table_name)
|
|
47
47
|
|
|
@@ -419,6 +419,9 @@ module Ridgepole
|
|
|
419
419
|
opts[:limit] = 4_294_967_295
|
|
420
420
|
end
|
|
421
421
|
end
|
|
422
|
+
|
|
423
|
+
# Workaround for Active Record 7.0
|
|
424
|
+
opts.delete(:precision) if attrs[:type] == :datetime && opts[:precision].nil?
|
|
422
425
|
end
|
|
423
426
|
end
|
|
424
427
|
|
|
@@ -13,7 +13,10 @@ module Ridgepole
|
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
module ConnectionAdapterExt
|
|
16
|
-
def execute(
|
|
16
|
+
def execute(*args)
|
|
17
|
+
sql = args.fetch(0)
|
|
18
|
+
name = args[1]
|
|
19
|
+
|
|
17
20
|
if Ridgepole::ExecuteExpander.noop
|
|
18
21
|
if (callback = Ridgepole::ExecuteExpander.callback)
|
|
19
22
|
sql = append_alter_extra(sql)
|
data/lib/ridgepole/version.rb
CHANGED
data/ridgepole.gemspec
CHANGED
|
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
|
24
24
|
|
|
25
25
|
spec.required_ruby_version = Gem::Requirement.new('>= 2.2.7') # rubocop:disable Gemspec/RequiredRubyVersion
|
|
26
26
|
|
|
27
|
-
spec.add_dependency 'activerecord', '>= 5.1', '<
|
|
27
|
+
spec.add_dependency 'activerecord', '>= 5.1', '< 7.1'
|
|
28
28
|
spec.add_dependency 'diffy'
|
|
29
29
|
|
|
30
30
|
spec.add_development_dependency 'appraisal', '>= 2.2.0'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ridgepole
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Genki Sugawara
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-12-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|
|
@@ -19,7 +19,7 @@ dependencies:
|
|
|
19
19
|
version: '5.1'
|
|
20
20
|
- - "<"
|
|
21
21
|
- !ruby/object:Gem::Version
|
|
22
|
-
version: '
|
|
22
|
+
version: '7.1'
|
|
23
23
|
type: :runtime
|
|
24
24
|
prerelease: false
|
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -29,7 +29,7 @@ dependencies:
|
|
|
29
29
|
version: '5.1'
|
|
30
30
|
- - "<"
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: '
|
|
32
|
+
version: '7.1'
|
|
33
33
|
- !ruby/object:Gem::Dependency
|
|
34
34
|
name: diffy
|
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -281,6 +281,7 @@ files:
|
|
|
281
281
|
- ".rubocop.yml"
|
|
282
282
|
- ".simplecov"
|
|
283
283
|
- Appraisals
|
|
284
|
+
- CHANGELOG.md
|
|
284
285
|
- Gemfile
|
|
285
286
|
- LICENSE.txt
|
|
286
287
|
- README.md
|
|
@@ -291,6 +292,7 @@ files:
|
|
|
291
292
|
- gemfiles/activerecord_5.2.gemfile
|
|
292
293
|
- gemfiles/activerecord_6.0.gemfile
|
|
293
294
|
- gemfiles/activerecord_6.1.gemfile
|
|
295
|
+
- gemfiles/activerecord_7.0.gemfile
|
|
294
296
|
- lib/ridgepole.rb
|
|
295
297
|
- lib/ridgepole/cli/config.rb
|
|
296
298
|
- lib/ridgepole/client.rb
|
|
@@ -333,7 +335,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
333
335
|
- !ruby/object:Gem::Version
|
|
334
336
|
version: '0'
|
|
335
337
|
requirements: []
|
|
336
|
-
rubygems_version: 3.
|
|
338
|
+
rubygems_version: 3.2.32
|
|
337
339
|
signing_key:
|
|
338
340
|
specification_version: 4
|
|
339
341
|
summary: Ridgepole is a tool to manage DB schema.
|