ridgepole 0.9.4 → 1.0.1
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/.rubocop.yml +1 -1
- data/.simplecov +1 -1
- data/Appraisals +4 -0
- data/CHANGELOG.md +246 -0
- data/README.md +20 -151
- data/bin/ridgepole +83 -85
- data/docker-compose.yml +26 -18
- data/gemfiles/activerecord_7.0.gemfile +7 -0
- data/lib/ridgepole/delta.rb +1 -1
- data/lib/ridgepole/diff.rb +4 -1
- data/lib/ridgepole/execute_expander.rb +4 -1
- data/lib/ridgepole/ext/abstract_adapter/disable_table_options.rb +1 -0
- data/lib/ridgepole/external_sql_executer.rb +11 -13
- data/lib/ridgepole/version.rb +1 -1
- data/ridgepole.gemspec +11 -7
- metadata +16 -289
- data/.github/workflows/test.yml +0 -70
- data/.gitignore +0 -25
- data/spec/cli_helper.rb +0 -65
- data/spec/dsl_parser/context_spec.rb +0 -16
- data/spec/erb_helper.rb +0 -26
- data/spec/fixtures/for_require_relative_spec.rb +0 -3
- data/spec/hide_pending_formatter.rb +0 -9
- data/spec/mysql/_migrate/migrate_change_table_option_spec.rb +0 -40
- data/spec/mysql/bigint_pk/int_pk_spec.rb +0 -47
- data/spec/mysql/cli/config_spec.rb +0 -210
- data/spec/mysql/cli/ridgepole_spec.rb +0 -447
- data/spec/mysql/collation/collation_spec.rb +0 -153
- data/spec/mysql/comment/comment_spec.rb +0 -179
- data/spec/mysql/default_lambda/default_lambda_spec.rb +0 -164
- data/spec/mysql/diff/diff2_spec.rb +0 -189
- data/spec/mysql/diff/diff_spec.rb +0 -168
- data/spec/mysql/dump/dump_class_method_spec.rb +0 -74
- data/spec/mysql/dump/dump_some_tables_spec.rb +0 -70
- data/spec/mysql/dump/dump_spec.rb +0 -74
- data/spec/mysql/dump/dump_unknown_column_type_spec.rb +0 -28
- data/spec/mysql/dump/dump_without_table_options_spec.rb +0 -34
- data/spec/mysql/fk/migrate_change_fk2_spec.rb +0 -47
- data/spec/mysql/fk/migrate_change_fk_spec.rb +0 -265
- data/spec/mysql/fk/migrate_create_fk_spec.rb +0 -349
- data/spec/mysql/fk/migrate_drop_fk_spec.rb +0 -331
- data/spec/mysql/fk/migrate_fk_with_column_spec.rb +0 -163
- data/spec/mysql/fk/migrate_ignore_fk_spec.rb +0 -70
- data/spec/mysql/migrate/check_orphan_index_spec.rb +0 -83
- data/spec/mysql/migrate/migrate_add_column2_spec.rb +0 -159
- data/spec/mysql/migrate/migrate_add_column_order_spec.rb +0 -242
- data/spec/mysql/migrate/migrate_add_column_spec.rb +0 -161
- data/spec/mysql/migrate/migrate_add_column_with_alter_extra_spec.rb +0 -276
- data/spec/mysql/migrate/migrate_add_column_with_script_spec.rb +0 -152
- data/spec/mysql/migrate/migrate_change_column2_spec.rb +0 -91
- data/spec/mysql/migrate/migrate_change_column3_spec.rb +0 -404
- data/spec/mysql/migrate/migrate_change_column4_spec.rb +0 -83
- data/spec/mysql/migrate/migrate_change_column5_spec.rb +0 -129
- data/spec/mysql/migrate/migrate_change_column6_spec.rb +0 -241
- data/spec/mysql/migrate/migrate_change_column7_spec.rb +0 -34
- data/spec/mysql/migrate/migrate_change_column8_spec.rb +0 -87
- data/spec/mysql/migrate/migrate_change_column_default_spec.rb +0 -199
- data/spec/mysql/migrate/migrate_change_column_float_spec.rb +0 -75
- data/spec/mysql/migrate/migrate_change_column_spec.rb +0 -158
- data/spec/mysql/migrate/migrate_change_index2_spec.rb +0 -86
- data/spec/mysql/migrate/migrate_change_index3_spec.rb +0 -179
- data/spec/mysql/migrate/migrate_change_index4_spec.rb +0 -112
- data/spec/mysql/migrate/migrate_change_index5_spec.rb +0 -74
- data/spec/mysql/migrate/migrate_change_index6_spec.rb +0 -202
- data/spec/mysql/migrate/migrate_change_index7_spec.rb +0 -85
- data/spec/mysql/migrate/migrate_change_index8_spec.rb +0 -85
- data/spec/mysql/migrate/migrate_change_index_spec.rb +0 -235
- data/spec/mysql/migrate/migrate_change_table_comment_spec.rb +0 -72
- data/spec/mysql/migrate/migrate_change_table_option_spec.rb +0 -83
- data/spec/mysql/migrate/migrate_check_relation_column_type_spec.rb +0 -225
- data/spec/mysql/migrate/migrate_create_index2_spec.rb +0 -203
- data/spec/mysql/migrate/migrate_create_index_spec.rb +0 -220
- data/spec/mysql/migrate/migrate_create_table_spec.rb +0 -123
- data/spec/mysql/migrate/migrate_create_table_with_ignore_spec.rb +0 -45
- data/spec/mysql/migrate/migrate_create_table_with_index_spec.rb +0 -43
- data/spec/mysql/migrate/migrate_create_table_with_options_spec.rb +0 -59
- data/spec/mysql/migrate/migrate_create_table_with_script_spec.rb +0 -132
- data/spec/mysql/migrate/migrate_drop_column_and_index2_spec.rb +0 -140
- data/spec/mysql/migrate/migrate_drop_column_and_index_spec.rb +0 -167
- data/spec/mysql/migrate/migrate_drop_column_and_unique_index_spec.rb +0 -52
- data/spec/mysql/migrate/migrate_drop_column_spec.rb +0 -158
- data/spec/mysql/migrate/migrate_drop_index_spec.rb +0 -160
- data/spec/mysql/migrate/migrate_drop_table_spec.rb +0 -123
- data/spec/mysql/migrate/migrate_duplicate_index_spec.rb +0 -27
- data/spec/mysql/migrate/migrate_duplicate_table_spec.rb +0 -37
- data/spec/mysql/migrate/migrate_empty_spec.rb +0 -78
- data/spec/mysql/migrate/migrate_execute_spec.rb +0 -288
- data/spec/mysql/migrate/migrate_ignore_column_spec.rb +0 -98
- data/spec/mysql/migrate/migrate_ignore_index_spec.rb +0 -92
- data/spec/mysql/migrate/migrate_log_file_spec.rb +0 -125
- data/spec/mysql/migrate/migrate_merge_mode_spec.rb +0 -145
- data/spec/mysql/migrate/migrate_noop_spec.rb +0 -234
- data/spec/mysql/migrate/migrate_primary_key_spec.rb +0 -104
- data/spec/mysql/migrate/migrate_rename_column_spec.rb +0 -184
- data/spec/mysql/migrate/migrate_rename_table_spec.rb +0 -241
- data/spec/mysql/migrate/migrate_same_default_null_spec.rb +0 -77
- data/spec/mysql/migrate/migrate_same_spec.rb +0 -82
- data/spec/mysql/migrate/migrate_script_error_spec.rb +0 -91
- data/spec/mysql/migrate/migrate_skip_column_comment_change_spec.rb +0 -39
- data/spec/mysql/migrate/migrate_skip_drop_table_spec.rb +0 -145
- data/spec/mysql/migrate/migrate_skip_rename_column_spec.rb +0 -140
- data/spec/mysql/migrate/migrate_skip_rename_table_spec.rb +0 -141
- data/spec/mysql/migrate/migrate_with_ignore_tables_spec.rb +0 -307
- data/spec/mysql/migrate/migrate_with_pre_post_query_spec.rb +0 -153
- data/spec/mysql/migrate/migrate_with_tables_spec.rb +0 -149
- data/spec/mysql/migrate/migrate_with_verbose_log_spec.rb +0 -60
- data/spec/mysql/ridgepole_test_database.sql +0 -2
- data/spec/mysql/ridgepole_test_tables.sql +0 -79
- data/spec/mysql/ridgepole_test_tables_unknown_column_type.sql +0 -17
- data/spec/mysql/text_blob_types/text_blob_types_spec.rb +0 -131
- data/spec/mysql/~default_name_fk/migrate_change_fk_spec.rb +0 -59
- data/spec/mysql/~default_name_fk/migrate_create_fk_spec.rb +0 -133
- data/spec/mysql/~default_name_fk/migrate_drop_fk_spec.rb +0 -100
- data/spec/mysql/~dump_auto_increment/migrate_create_table_with_index_spec.rb +0 -43
- data/spec/mysql57/json/add_json_column_spec.rb +0 -35
- data/spec/mysql57/json/change_json_column_spec.rb +0 -102
- data/spec/mysql57/json/drop_json_column_spec.rb +0 -35
- data/spec/mysql57/virtual/add_virtual_column_spec.rb +0 -37
- data/spec/mysql57/virtual/change_virtual_column_spec.rb +0 -40
- data/spec/mysql57/virtual/drop_virtual_column_spec.rb +0 -37
- data/spec/postgresql/diff/diff_spec.rb +0 -216
- data/spec/postgresql/dump/dump_spec.rb +0 -69
- data/spec/postgresql/fk/migrate_change_fk_spec.rb +0 -115
- data/spec/postgresql/fk/migrate_create_fk_spec.rb +0 -176
- data/spec/postgresql/fk/migrate_drop_fk_spec.rb +0 -197
- data/spec/postgresql/migrate/migrate_add_column_spec.rb +0 -203
- data/spec/postgresql/migrate/migrate_add_expression_index_spec.rb +0 -25
- data/spec/postgresql/migrate/migrate_bigint_spec.rb +0 -53
- data/spec/postgresql/migrate/migrate_change_column_default_spec.rb +0 -38
- data/spec/postgresql/migrate/migrate_change_column_spec.rb +0 -185
- data/spec/postgresql/migrate/migrate_change_index_spec.rb +0 -164
- data/spec/postgresql/migrate/migrate_check_relation_column_type_spec.rb +0 -114
- data/spec/postgresql/migrate/migrate_create_table_spec.rb +0 -120
- data/spec/postgresql/migrate/migrate_create_table_with_default_proc_spec.rb +0 -112
- data/spec/postgresql/migrate/migrate_drop_column_spec.rb +0 -163
- data/spec/postgresql/migrate/migrate_drop_column_with_index_spec.rb +0 -166
- data/spec/postgresql/migrate/migrate_drop_expression_index_spec.rb +0 -59
- data/spec/postgresql/migrate/migrate_drop_index_spec.rb +0 -158
- data/spec/postgresql/migrate/migrate_drop_table_spec.rb +0 -122
- data/spec/postgresql/migrate/migrate_ext_cols_spec.rb +0 -64
- data/spec/postgresql/migrate/migrate_primary_key2_spec.rb +0 -73
- data/spec/postgresql/migrate/migrate_primary_key_spec.rb +0 -99
- data/spec/postgresql/migrate/migrate_references_spec.rb +0 -90
- data/spec/postgresql/migrate/migrate_rename_column_spec.rb +0 -155
- data/spec/postgresql/migrate/migrate_rename_table_spec.rb +0 -175
- data/spec/postgresql/migrate/migrate_same_spec.rb +0 -77
- data/spec/postgresql/ridgepole_test_database.sql +0 -16
- data/spec/postgresql/ridgepole_test_tables.sql +0 -75
- data/spec/postgresql/~default_name_fk/migrate_change_fk_spec.rb +0 -59
- data/spec/postgresql/~default_name_fk/migrate_create_fk_spec.rb +0 -134
- data/spec/postgresql/~default_name_fk/migrate_drop_fk_spec.rb +0 -100
- data/spec/processing_for_ci.rb +0 -13
- data/spec/spec_condition.rb +0 -58
- data/spec/spec_const.rb +0 -20
- data/spec/spec_helper.rb +0 -173
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: df3bfdcffa2eb5efe360debc1e37b578cde066eca7c9893f38cd110cab576b31
|
|
4
|
+
data.tar.gz: 44af328c711fe5f4d9cf2accbf5eef8a0738daa7b7047cfb47c0ec403ee34149
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f2d96fd5d2683583ea72cb91fcb7659c8c9f2d76b9e3b323b0eb1af99cbb737c3f7e79888aefd6b71e850ac6a34e4c7b291bcff141574bc43a28ac112efc4d2b
|
|
7
|
+
data.tar.gz: d191764d26bfb55e70a95ef9f1a806a22e97746b54dcf1616cb3e4ae58425b2d187b9d3c023f70e62c1f6a507546888871e8a5ccb410a87dd1b22601b2b71902
|
data/.rubocop.yml
CHANGED
data/.simplecov
CHANGED
data/Appraisals
CHANGED
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.0
|
|
4
|
+
|
|
5
|
+
### 1.0.1 (2022/01/15)
|
|
6
|
+
|
|
7
|
+
* Fix code for RuboCop 1.24.1
|
|
8
|
+
* Fix PostgreSQL spec for Rails 7.0
|
|
9
|
+
* Update ERBh gem (for development)
|
|
10
|
+
|
|
11
|
+
### 1.0.0 (2021/12/19)
|
|
12
|
+
|
|
13
|
+
* Support Rails 7.0
|
|
14
|
+
* `--skip-drop-table` by default ([pull#363](https://github.com/ridgepole/ridgepole/pull/363))
|
|
15
|
+
|
|
16
|
+
## 0.9
|
|
17
|
+
|
|
18
|
+
### 0.9.6
|
|
19
|
+
|
|
20
|
+
* Fix malformed error ([pull#362](https://github.com/ridgepole/ridgepole/pull/362))
|
|
21
|
+
|
|
22
|
+
### 0.9.5
|
|
23
|
+
|
|
24
|
+
* Call `super` in `disable_table_options.rb` ([pull#357](https://github.com/ridgepole/ridgepole/pull/357))
|
|
25
|
+
|
|
26
|
+
### 0.9.4
|
|
27
|
+
|
|
28
|
+
* Fix `--alter-extra` option for unique index ([pull#356](https://github.com/ridgepole/ridgepole/pull/356))
|
|
29
|
+
|
|
30
|
+
### 0.9.3
|
|
31
|
+
|
|
32
|
+
* Fix `limit` option for `t.integer` ([pull#354](https://github.com/ridgepole/ridgepole/pull/354))
|
|
33
|
+
|
|
34
|
+
### 0.9.2
|
|
35
|
+
|
|
36
|
+
* Support `t.column index option` ([pull#353](https://github.com/ridgepole/ridgepole/pull/353))
|
|
37
|
+
|
|
38
|
+
### 0.9.1
|
|
39
|
+
|
|
40
|
+
* Support `t.foreign_key` ([pull#348](https://github.com/ridgepole/ridgepole/pull/348))
|
|
41
|
+
|
|
42
|
+
### 0.9.0
|
|
43
|
+
|
|
44
|
+
* Remove `--mysql-use-alter` option ([pull#330](https://github.com/ridgepole/ridgepole/pull/330))
|
|
45
|
+
* Add `--table-hash-options` option ([pull#331](https://github.com/ridgepole/ridgepole/pull/331))
|
|
46
|
+
* Support Rails 6.1 ([pull#323](https://github.com/ridgepole/ridgepole/pull/323))
|
|
47
|
+
* Disable Rails 5.0 support ([pull#335](https://github.com/ridgepole/ridgepole/pull/335))
|
|
48
|
+
* Fix PK AUTO_INCREMENT change bug ([pull#334](https://github.com/ridgepole/ridgepole/pull/334))
|
|
49
|
+
|
|
50
|
+
## 0.8
|
|
51
|
+
|
|
52
|
+
### 0.8.13
|
|
53
|
+
|
|
54
|
+
* Support `serial` and `bigserial` column types ([pull#321](https://github.com/ridgepole/ridgepole/pull/321))
|
|
55
|
+
|
|
56
|
+
### 0.8.12
|
|
57
|
+
|
|
58
|
+
* Pluralize column specified by `references` ([pull#317](https://github.com/ridgepole/ridgepole/pull/317))
|
|
59
|
+
|
|
60
|
+
### 0.8.11
|
|
61
|
+
|
|
62
|
+
* Fix FK index check support multiple PK ([pull#315](https://github.com/ridgepole/ridgepole/pull/315))
|
|
63
|
+
* Support t.reference() foreign_key option ([pull#316](https://github.com/ridgepole/ridgepole/pull/316))
|
|
64
|
+
|
|
65
|
+
### 0.8.10
|
|
66
|
+
|
|
67
|
+
* Raise an error if an InnoDB column has a foreign key but no index ([pull#310](https://github.com/ridgepole/ridgepole/pull/310))
|
|
68
|
+
|
|
69
|
+
### 0.8.9
|
|
70
|
+
|
|
71
|
+
* Fix unexpected differences on text types and blob types on Rails 6 ([pull#306](https://github.com/ridgepole/ridgepole/pull/306))
|
|
72
|
+
* Fix unexpected warning when a foreign key is added on the primary key ([pull#307](https://github.com/ridgepole/ridgepole/pull/307))
|
|
73
|
+
|
|
74
|
+
### 0.8.8
|
|
75
|
+
|
|
76
|
+
* Fix keyword arguments warnings in Ruby 2.7 ([pull#303](https://github.com/ridgepole/ridgepole/pull/303))
|
|
77
|
+
|
|
78
|
+
### 0.8.7
|
|
79
|
+
|
|
80
|
+
* Support `require_relative` ([pull#298](https://github.com/ridgepole/ridgepole/pull/298))
|
|
81
|
+
|
|
82
|
+
### 0.8.6
|
|
83
|
+
|
|
84
|
+
* Support multiple databases feature ([pull#297](https://github.com/ridgepole/ridgepole/pull/297))
|
|
85
|
+
|
|
86
|
+
### 0.8.5
|
|
87
|
+
|
|
88
|
+
* Improve warning message on table options ([pull#291](https://github.com/ridgepole/ridgepole/pull/291))
|
|
89
|
+
|
|
90
|
+
### 0.8.4
|
|
91
|
+
|
|
92
|
+
* 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/ridgepole/ridgepole/pull/290))
|
|
93
|
+
|
|
94
|
+
### 0.8.3
|
|
95
|
+
|
|
96
|
+
* Fix "topological sort failed" error ([pull#287](https://github.com/ridgepole/ridgepole/pull/287))
|
|
97
|
+
|
|
98
|
+
### 0.8.2
|
|
99
|
+
|
|
100
|
+
* Support `postgres://` schema ([pull#285](https://github.com/ridgepole/ridgepole/pull/285))
|
|
101
|
+
|
|
102
|
+
### 0.8.1
|
|
103
|
+
|
|
104
|
+
* Drop tables in an order considering foreign key constraints ([pull#284](https://github.com/ridgepole/ridgepole/pull/284))
|
|
105
|
+
|
|
106
|
+
### 0.8.0
|
|
107
|
+
|
|
108
|
+
* Support Rails 6.0
|
|
109
|
+
|
|
110
|
+
## 0.7
|
|
111
|
+
|
|
112
|
+
### 0.7.8
|
|
113
|
+
|
|
114
|
+
* Fix for `add_foreign_key(..., column: ,,,)` ([pull#278](https://github.com/ridgepole/ridgepole/pull/278))
|
|
115
|
+
|
|
116
|
+
### 0.7.7
|
|
117
|
+
|
|
118
|
+
* Support URI query string ([pull#273](https://github.com/ridgepole/ridgepole/pull/273))
|
|
119
|
+
|
|
120
|
+
### 0.7.6
|
|
121
|
+
|
|
122
|
+
* Fix database url check ([pull#266](https://github.com/ridgepole/ridgepole/pull/266))
|
|
123
|
+
* Add ignore option ([pull#267](https://github.com/ridgepole/ridgepole/pull/267))
|
|
124
|
+
|
|
125
|
+
### 0.7.5
|
|
126
|
+
|
|
127
|
+
* Fix polymorphic options ([pull#263](https://github.com/ridgepole/ridgepole/pull/263))
|
|
128
|
+
* Fix `--mysql-use-alter` option ([pull#246](https://github.com/ridgepole/ridgepole/pull/264))
|
|
129
|
+
* Fix Database URI parsing ([pull#265](https://github.com/ridgepole/ridgepole/pull/265))
|
|
130
|
+
|
|
131
|
+
### 0.7.4
|
|
132
|
+
|
|
133
|
+
* Fix `add_foreign_key` options ([issue#250](https://github.com/ridgepole/ridgepole/issues/250))
|
|
134
|
+
|
|
135
|
+
### 0.7.3
|
|
136
|
+
|
|
137
|
+
* Add `--mysql-change-table-comment option` ([pull#166](https://github.com/ridgepole/ridgepole/pull/166))
|
|
138
|
+
* Refactoring with RuboCop
|
|
139
|
+
* Support primary key adding/dropping ([issue#246](https://github.com/ridgepole/ridgepole/issues/246))
|
|
140
|
+
|
|
141
|
+
### 0.7.2
|
|
142
|
+
|
|
143
|
+
* Support Rails 5.2
|
|
144
|
+
|
|
145
|
+
### 0.7.1
|
|
146
|
+
|
|
147
|
+
* Remove `--reverse` option
|
|
148
|
+
* Add `--allow-pk-change` option
|
|
149
|
+
* Add `--create-table-with-index` option
|
|
150
|
+
* Add `--mysql-dump-auto-increment` option (`rails >= 5.1`)
|
|
151
|
+
|
|
152
|
+
### 0.7.0
|
|
153
|
+
|
|
154
|
+
* Remove Rails 4.x support
|
|
155
|
+
* Add Rails 5.1 support
|
|
156
|
+
* Remove `--enable-mysql-awesome` option
|
|
157
|
+
* Add `--skip-drop-table` option
|
|
158
|
+
* Support foreign key without name
|
|
159
|
+
* Support MySQL JSON Type and Generated Columns
|
|
160
|
+
* Add `--mysql-change-table-options` option
|
|
161
|
+
* Pass config from env
|
|
162
|
+
* Fix change fk order
|
|
163
|
+
* Add `--check-relation-type` option
|
|
164
|
+
* Add `--skip-column-comment-change` option
|
|
165
|
+
* Add `--default-bigint-limit` option
|
|
166
|
+
* Add `--ignore-table-comment` option
|
|
167
|
+
|
|
168
|
+
## 0.6
|
|
169
|
+
|
|
170
|
+
### 0.6.6
|
|
171
|
+
|
|
172
|
+
* Use `t.column` for migration ([pull#114](https://github.com/ridgepole/ridgepole/pull/114))
|
|
173
|
+
* Support DATABASE_URL format ([pull#118](https://github.com/ridgepole/ridgepole/pull/118))
|
|
174
|
+
* Add Ruby2.4 CI ([pull#119](https://github.com/ridgepole/ridgepole/pull/119))
|
|
175
|
+
|
|
176
|
+
### 0.6.5
|
|
177
|
+
|
|
178
|
+
* Fix rails version `'>= 4.2', '< 6'`
|
|
179
|
+
* Support new types ([pull#84](https://github.com/ridgepole/ridgepole/pull/84))
|
|
180
|
+
* Support `default: -> { ... }` ([pull#85](https://github.com/ridgepole/ridgepole/pull/85))
|
|
181
|
+
* Support DDL Comment (Rails5 only)
|
|
182
|
+
* Output schema diff when pass `--verbose`
|
|
183
|
+
* Support composite primary key (Rails5 only / [pull#97](https://github.com/ridgepole/ridgepole/pull/97))
|
|
184
|
+
|
|
185
|
+
### 0.6.4
|
|
186
|
+
|
|
187
|
+
* Execute sql using external script ([pull#56](https://github.com/ridgepole/ridgepole/pull/56))
|
|
188
|
+
* Add `--mysql-use-alter` option
|
|
189
|
+
* Add `--alter-extra` option
|
|
190
|
+
* Add `--dump-with-default-fk-name` option
|
|
191
|
+
* Support `t.index` ([pull#64](https://github.com/ridgepole/ridgepole/pull/64))
|
|
192
|
+
* Remove migration_comments
|
|
193
|
+
* Fix foreign key apply order
|
|
194
|
+
|
|
195
|
+
### 0.6.3
|
|
196
|
+
|
|
197
|
+
* Fix `default` option ([pull#48](https://github.com/ridgepole/ridgepole/pull/48))
|
|
198
|
+
* Add `--enable-migration-comments` option ([pull#50](https://github.com/ridgepole/ridgepole/pull/50))
|
|
199
|
+
* Disable `rename_table_indexes`
|
|
200
|
+
|
|
201
|
+
### 0.6.1
|
|
202
|
+
|
|
203
|
+
* Support [PostgreSQL columns](https://github.com/winebarrel/rails/blob/v4.2.1/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb#L79)
|
|
204
|
+
|
|
205
|
+
### 0.6.0
|
|
206
|
+
|
|
207
|
+
* Fix rails version `~> 4.2.1`
|
|
208
|
+
* Disable following libraries support:
|
|
209
|
+
* activerecord-mysql-unsigned
|
|
210
|
+
* migration_comments
|
|
211
|
+
* foreigner
|
|
212
|
+
* Disable sqlite support
|
|
213
|
+
* Add PostgreSQL test
|
|
214
|
+
* Remove `--mysql-awesome-unsigned-pk` option
|
|
215
|
+
|
|
216
|
+
## 0.5
|
|
217
|
+
|
|
218
|
+
### 0.5.2
|
|
219
|
+
|
|
220
|
+
* Add `--enable-mysql-awesome` option ([activerecord-mysql-awesome](https://github.com/kamipo/activerecord-mysql-awesome) is required `>= 0.0.3`)
|
|
221
|
+
* 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`
|
|
222
|
+
* Fix foreigner version `<= 1.7.1`
|
|
223
|
+
|
|
224
|
+
### 0.5.1
|
|
225
|
+
|
|
226
|
+
* Add `--enable-migration-comments` option ([migration_comments](https://github.com/pinnymz/migration_comments) is required)
|
|
227
|
+
* Fix rails version `< 4.2.0`
|
|
228
|
+
|
|
229
|
+
### 0.5.0
|
|
230
|
+
|
|
231
|
+
* Fix `activerecord-mysql-unsigned` version: `~> 0.3.1`
|
|
232
|
+
|
|
233
|
+
## 0.4
|
|
234
|
+
|
|
235
|
+
### 0.4.12
|
|
236
|
+
|
|
237
|
+
* Fix `activerecord-mysql-unsigned` version: `~> 0.2.0`
|
|
238
|
+
|
|
239
|
+
### 0.4.11
|
|
240
|
+
|
|
241
|
+
* Add `--enable-mysql-pkdump` option.
|
|
242
|
+
|
|
243
|
+
### 0.4.8
|
|
244
|
+
|
|
245
|
+
* `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.
|
|
246
|
+
* 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,152 +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
|
-
</details>
|
|
9
|
+
[](https://github.com/ridgepole/ridgepole/actions)
|
|
10
|
+
[](https://coveralls.io/github/ridgepole/ridgepole?branch=1.0)
|
|
147
11
|
|
|
148
12
|
**Notice**
|
|
149
13
|
|
|
150
|
-
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.
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
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/ridgepole/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
|
|
155
23
|
|
|
156
24
|
## Installation
|
|
157
25
|
|
|
@@ -202,7 +70,7 @@ Usage: ridgepole [options]
|
|
|
202
70
|
--dump-without-table-options
|
|
203
71
|
--dump-with-default-fk-name
|
|
204
72
|
--index-removed-drop-column
|
|
205
|
-
--
|
|
73
|
+
--drop-table
|
|
206
74
|
--mysql-change-table-options
|
|
207
75
|
--mysql-change-table-comment
|
|
208
76
|
--check-relation-type DEF_PK
|
|
@@ -435,16 +303,17 @@ Apply `Schemafile`
|
|
|
435
303
|
|
|
436
304
|
## Run tests
|
|
437
305
|
|
|
306
|
+
|
|
438
307
|
```sh
|
|
439
308
|
docker-compose up -d
|
|
440
309
|
bundle install
|
|
441
310
|
bundle exec appraisal install
|
|
442
|
-
bundle exec appraisal activerecord-
|
|
443
|
-
# POSTGRESQL=1 bundle exec appraisal activerecord-
|
|
444
|
-
# MYSQL57=1 bundle exec appraisal activerecord-
|
|
311
|
+
bundle exec appraisal activerecord-7.0 rake
|
|
312
|
+
# POSTGRESQL=1 bundle exec appraisal activerecord-7.0 rake
|
|
313
|
+
# MYSQL57=1 bundle exec appraisal activerecord-7.0 rake
|
|
445
314
|
```
|
|
446
315
|
|
|
447
|
-
**Notice:** mysql-client/postgresql-client is required.
|
|
316
|
+
**Notice:** Ruby 2.6 or above/mysql-client/postgresql-client is required.
|
|
448
317
|
|
|
449
318
|
## Demo
|
|
450
319
|
|
|
@@ -453,6 +322,6 @@ bundle exec appraisal activerecord-5.1 rake
|
|
|
453
322
|
|
|
454
323
|
## Example project
|
|
455
324
|
|
|
456
|
-
* https://github.com/
|
|
457
|
-
* https://github.com/
|
|
458
|
-
* https://github.com/
|
|
325
|
+
* https://github.com/ridgepole/ridgepole-example
|
|
326
|
+
* https://github.com/ridgepole/ridgepole-example/pull/1
|
|
327
|
+
* https://github.com/ridgepole/ridgepole-example/pull/2
|