pg_trunk 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/README.md +1 -1
- data/lib/pg_trunk/core/railtie/custom_types.rb +5 -6
- data/lib/pg_trunk/operations/check_constraints/add_check_constraint.rb +18 -12
- data/lib/pg_trunk/operations/check_constraints/drop_check_constraint.rb +18 -10
- data/lib/pg_trunk/operations/check_constraints/rename_check_constraint.rb +12 -6
- data/lib/pg_trunk/operations/check_constraints/validate_check_constraint.rb +6 -2
- data/lib/pg_trunk/operations/composite_types/change_composite_type.rb +24 -18
- data/lib/pg_trunk/operations/composite_types/create_composite_type.rb +10 -9
- data/lib/pg_trunk/operations/composite_types/drop_composite_type.rb +25 -23
- data/lib/pg_trunk/operations/composite_types/rename_composite_type.rb +3 -3
- data/lib/pg_trunk/operations/domains/change_domain.rb +27 -24
- data/lib/pg_trunk/operations/domains/create_domain.rb +11 -11
- data/lib/pg_trunk/operations/domains/drop_domain.rb +19 -13
- data/lib/pg_trunk/operations/domains/rename_domain.rb +3 -1
- data/lib/pg_trunk/operations/enums/change_enum.rb +13 -11
- data/lib/pg_trunk/operations/enums/create_enum.rb +9 -9
- data/lib/pg_trunk/operations/enums/drop_enum.rb +18 -10
- data/lib/pg_trunk/operations/enums/rename_enum.rb +3 -1
- data/lib/pg_trunk/operations/foreign_keys/add_foreign_key.rb +23 -17
- data/lib/pg_trunk/operations/foreign_keys/drop_foreign_key.rb +17 -11
- data/lib/pg_trunk/operations/foreign_keys/rename_foreign_key.rb +11 -5
- data/lib/pg_trunk/operations/functions/change_function.rb +24 -21
- data/lib/pg_trunk/operations/functions/create_function.rb +34 -26
- data/lib/pg_trunk/operations/functions/drop_function.rb +28 -18
- data/lib/pg_trunk/operations/functions/rename_function.rb +6 -2
- data/lib/pg_trunk/operations/materialized_views/change_materialized_view.rb +24 -17
- data/lib/pg_trunk/operations/materialized_views/create_materialized_view.rb +37 -29
- data/lib/pg_trunk/operations/materialized_views/drop_materialized_view.rb +20 -10
- data/lib/pg_trunk/operations/materialized_views/refresh_materialized_view.rb +3 -1
- data/lib/pg_trunk/operations/materialized_views/rename_materialized_view.rb +8 -4
- data/lib/pg_trunk/operations/procedures/change_procedure.rb +22 -18
- data/lib/pg_trunk/operations/procedures/create_procedure.rb +26 -18
- data/lib/pg_trunk/operations/procedures/drop_procedure.rb +18 -10
- data/lib/pg_trunk/operations/procedures/rename_procedure.rb +6 -2
- data/lib/pg_trunk/operations/statistics/create_statistics.rb +32 -24
- data/lib/pg_trunk/operations/statistics/drop_statistics.rb +26 -18
- data/lib/pg_trunk/operations/statistics/rename_statistics.rb +3 -1
- data/lib/pg_trunk/operations/triggers/change_trigger.rb +9 -7
- data/lib/pg_trunk/operations/triggers/create_trigger.rb +26 -20
- data/lib/pg_trunk/operations/triggers/drop_trigger.rb +16 -10
- data/lib/pg_trunk/operations/views/change_view.rb +20 -14
- data/lib/pg_trunk/operations/views/create_view.rb +18 -10
- data/lib/pg_trunk/operations/views/drop_view.rb +19 -9
- data/lib/pg_trunk/operations/views/rename_view.rb +6 -2
- data/lib/pg_trunk/version.rb +1 -1
- metadata +1 -1
@@ -12,12 +12,16 @@
|
|
12
12
|
# # A view can be renamed by changing both the name
|
13
13
|
# # and the schema (namespace) it belongs to.
|
14
14
|
# #
|
15
|
-
# #
|
15
|
+
# # ```ruby
|
16
|
+
# # rename_view "views.admin_users", to: "admins"
|
17
|
+
# # ```
|
16
18
|
# #
|
17
19
|
# # With the `if_exists: true` option, the operation won't fail
|
18
20
|
# # even when the view wasn't existed.
|
19
21
|
# #
|
20
|
-
# #
|
22
|
+
# # ```ruby
|
23
|
+
# # rename_view "views.admin_users", to: "admins", if_exists: true
|
24
|
+
# # ```
|
21
25
|
# #
|
22
26
|
# # At the same time, the option makes a view irreversible
|
23
27
|
# # due to uncertainty of the previous state of the database.
|
data/lib/pg_trunk/version.rb
CHANGED