declare_schema 0.8.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/declare_schema_build.yml +1 -1
- data/CHANGELOG.md +37 -0
- data/Gemfile.lock +1 -1
- data/README.md +102 -14
- data/lib/declare_schema.rb +57 -0
- data/lib/declare_schema/dsl.rb +39 -0
- data/lib/declare_schema/extensions/active_record/fields_declaration.rb +23 -4
- data/lib/declare_schema/model.rb +4 -6
- data/lib/declare_schema/model/column.rb +1 -1
- data/lib/declare_schema/model/field_spec.rb +9 -6
- data/lib/declare_schema/model/foreign_key_definition.rb +6 -11
- data/lib/declare_schema/model/index_definition.rb +1 -20
- data/lib/declare_schema/schema_change/all.rb +22 -0
- data/lib/declare_schema/schema_change/base.rb +45 -0
- data/lib/declare_schema/schema_change/column_add.rb +27 -0
- data/lib/declare_schema/schema_change/column_change.rb +32 -0
- data/lib/declare_schema/schema_change/column_remove.rb +20 -0
- data/lib/declare_schema/schema_change/column_rename.rb +23 -0
- data/lib/declare_schema/schema_change/foreign_key_add.rb +25 -0
- data/lib/declare_schema/schema_change/foreign_key_remove.rb +20 -0
- data/lib/declare_schema/schema_change/index_add.rb +33 -0
- data/lib/declare_schema/schema_change/index_remove.rb +20 -0
- data/lib/declare_schema/schema_change/primary_key_change.rb +33 -0
- data/lib/declare_schema/schema_change/table_add.rb +37 -0
- data/lib/declare_schema/schema_change/table_change.rb +36 -0
- data/lib/declare_schema/schema_change/table_remove.rb +22 -0
- data/lib/declare_schema/schema_change/table_rename.rb +22 -0
- data/lib/declare_schema/version.rb +1 -1
- data/lib/generators/declare_schema/migration/USAGE +14 -24
- data/lib/generators/declare_schema/migration/migration_generator.rb +40 -38
- data/lib/generators/declare_schema/migration/migrator.rb +184 -198
- data/lib/generators/declare_schema/migration/templates/migration.rb.erb +1 -1
- data/lib/generators/declare_schema/support/model.rb +4 -4
- data/spec/lib/declare_schema/api_spec.rb +8 -8
- data/spec/lib/declare_schema/field_declaration_dsl_spec.rb +41 -15
- data/spec/lib/declare_schema/field_spec_spec.rb +44 -2
- data/spec/lib/declare_schema/generator_spec.rb +5 -5
- data/spec/lib/declare_schema/interactive_primary_key_spec.rb +117 -28
- data/spec/lib/declare_schema/migration_generator_spec.rb +1990 -843
- data/spec/lib/declare_schema/model/column_spec.rb +49 -23
- data/spec/lib/declare_schema/model/foreign_key_definition_spec.rb +158 -57
- data/spec/lib/declare_schema/model/habtm_model_shim_spec.rb +0 -2
- data/spec/lib/declare_schema/model/index_definition_spec.rb +189 -78
- data/spec/lib/declare_schema/model/table_options_definition_spec.rb +75 -11
- data/spec/lib/declare_schema/schema_change/base_spec.rb +75 -0
- data/spec/lib/declare_schema/schema_change/column_add_spec.rb +30 -0
- data/spec/lib/declare_schema/schema_change/column_change_spec.rb +33 -0
- data/spec/lib/declare_schema/schema_change/column_remove_spec.rb +30 -0
- data/spec/lib/declare_schema/schema_change/column_rename_spec.rb +28 -0
- data/spec/lib/declare_schema/schema_change/foreign_key_add_spec.rb +29 -0
- data/spec/lib/declare_schema/schema_change/foreign_key_remove_spec.rb +29 -0
- data/spec/lib/declare_schema/schema_change/index_add_spec.rb +56 -0
- data/spec/lib/declare_schema/schema_change/index_remove_spec.rb +29 -0
- data/spec/lib/declare_schema/schema_change/primary_key_change_spec.rb +69 -0
- data/spec/lib/declare_schema/schema_change/table_add_spec.rb +50 -0
- data/spec/lib/declare_schema/schema_change/table_change_spec.rb +30 -0
- data/spec/lib/declare_schema/schema_change/table_remove_spec.rb +27 -0
- data/spec/lib/declare_schema/schema_change/table_rename_spec.rb +27 -0
- data/spec/lib/declare_schema_spec.rb +101 -0
- data/spec/lib/generators/declare_schema/migration/migrator_spec.rb +71 -13
- data/spec/spec_helper.rb +1 -1
- data/spec/support/acceptance_spec_helpers.rb +2 -2
- metadata +36 -6
- data/test_responses.txt +0 -2
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: declare_schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Invoca Development adapted from hobo_fields by Tom Locke
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -57,6 +57,7 @@ files:
|
|
57
57
|
- gemfiles/rails_6_sqlite.gemfile
|
58
58
|
- lib/declare_schema.rb
|
59
59
|
- lib/declare_schema/command.rb
|
60
|
+
- lib/declare_schema/dsl.rb
|
60
61
|
- lib/declare_schema/extensions/active_record/fields_declaration.rb
|
61
62
|
- lib/declare_schema/extensions/module.rb
|
62
63
|
- lib/declare_schema/field_declaration_dsl.rb
|
@@ -68,6 +69,21 @@ files:
|
|
68
69
|
- lib/declare_schema/model/index_definition.rb
|
69
70
|
- lib/declare_schema/model/table_options_definition.rb
|
70
71
|
- lib/declare_schema/railtie.rb
|
72
|
+
- lib/declare_schema/schema_change/all.rb
|
73
|
+
- lib/declare_schema/schema_change/base.rb
|
74
|
+
- lib/declare_schema/schema_change/column_add.rb
|
75
|
+
- lib/declare_schema/schema_change/column_change.rb
|
76
|
+
- lib/declare_schema/schema_change/column_remove.rb
|
77
|
+
- lib/declare_schema/schema_change/column_rename.rb
|
78
|
+
- lib/declare_schema/schema_change/foreign_key_add.rb
|
79
|
+
- lib/declare_schema/schema_change/foreign_key_remove.rb
|
80
|
+
- lib/declare_schema/schema_change/index_add.rb
|
81
|
+
- lib/declare_schema/schema_change/index_remove.rb
|
82
|
+
- lib/declare_schema/schema_change/primary_key_change.rb
|
83
|
+
- lib/declare_schema/schema_change/table_add.rb
|
84
|
+
- lib/declare_schema/schema_change/table_change.rb
|
85
|
+
- lib/declare_schema/schema_change/table_remove.rb
|
86
|
+
- lib/declare_schema/schema_change/table_rename.rb
|
71
87
|
- lib/declare_schema/version.rb
|
72
88
|
- lib/generators/declare_schema/migration/USAGE
|
73
89
|
- lib/generators/declare_schema/migration/migration_generator.rb
|
@@ -90,15 +106,29 @@ files:
|
|
90
106
|
- spec/lib/declare_schema/model/index_definition_spec.rb
|
91
107
|
- spec/lib/declare_schema/model/table_options_definition_spec.rb
|
92
108
|
- spec/lib/declare_schema/prepare_testapp.rb
|
109
|
+
- spec/lib/declare_schema/schema_change/base_spec.rb
|
110
|
+
- spec/lib/declare_schema/schema_change/column_add_spec.rb
|
111
|
+
- spec/lib/declare_schema/schema_change/column_change_spec.rb
|
112
|
+
- spec/lib/declare_schema/schema_change/column_remove_spec.rb
|
113
|
+
- spec/lib/declare_schema/schema_change/column_rename_spec.rb
|
114
|
+
- spec/lib/declare_schema/schema_change/foreign_key_add_spec.rb
|
115
|
+
- spec/lib/declare_schema/schema_change/foreign_key_remove_spec.rb
|
116
|
+
- spec/lib/declare_schema/schema_change/index_add_spec.rb
|
117
|
+
- spec/lib/declare_schema/schema_change/index_remove_spec.rb
|
118
|
+
- spec/lib/declare_schema/schema_change/primary_key_change_spec.rb
|
119
|
+
- spec/lib/declare_schema/schema_change/table_add_spec.rb
|
120
|
+
- spec/lib/declare_schema/schema_change/table_change_spec.rb
|
121
|
+
- spec/lib/declare_schema/schema_change/table_remove_spec.rb
|
122
|
+
- spec/lib/declare_schema/schema_change/table_rename_spec.rb
|
123
|
+
- spec/lib/declare_schema_spec.rb
|
93
124
|
- spec/lib/generators/declare_schema/migration/migrator_spec.rb
|
94
125
|
- spec/spec_helper.rb
|
95
126
|
- spec/support/acceptance_spec_helpers.rb
|
96
|
-
- test_responses.txt
|
97
127
|
homepage: https://github.com/Invoca/declare_schema
|
98
128
|
licenses: []
|
99
129
|
metadata:
|
100
130
|
allowed_push_host: https://rubygems.org
|
101
|
-
post_install_message:
|
131
|
+
post_install_message:
|
102
132
|
rdoc_options: []
|
103
133
|
require_paths:
|
104
134
|
- lib
|
@@ -114,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
144
|
version: 1.3.6
|
115
145
|
requirements: []
|
116
146
|
rubygems_version: 3.0.3
|
117
|
-
signing_key:
|
147
|
+
signing_key:
|
118
148
|
specification_version: 4
|
119
149
|
summary: Database schema declaration and migration generator for Rails
|
120
150
|
test_files: []
|
data/test_responses.txt
DELETED