Skip to content

Commit

Permalink
Merge pull request #288 from ifad/chore/use-dependent
Browse files Browse the repository at this point in the history
Replace dependant with dependent
  • Loading branch information
tagliala authored May 3, 2024
2 parents 83b1c87 + 43a44b9 commit d9d2837
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ view and all the trigger machinery. Every other housekeeping of the temporal
structure is handled behind the scenes by the other schema statements. E.g.:

* `rename_table` - renames tables, views, sequences, indexes and triggers
* `drop_table` - drops the temporal table and all dependant objects
* `drop_table` - drops the temporal table and all dependent objects
* `add_column` - adds the column to the current table and updates triggers
* `rename_column` - renames the current table column and updates the triggers
* `remove_column` - removes the current table column and updates the triggers
Expand Down Expand Up @@ -279,12 +279,12 @@ cannot be deleted.

ChronoModel currently performs upgrades by dropping and re-creating the views
that give access to current data. If you have built other database objects on
these views, the upgrade cannot be performed automatically as the dependant
these views, the upgrade cannot be performed automatically as the dependent
objects must be dropped first.

When booting, ChronoModel will issue a warning in your logs about the need of
a structure upgrade. Structure usually changes across versions. In this case,
you need to set up a rake task that drops your dependant objects, runs
you need to set up a rake task that drops your dependent objects, runs
ChronoModel.upgrade! and then re-creates them.

A migration system should be introduced, but it is seen as overkill for now,
Expand Down
2 changes: 1 addition & 1 deletion lib/chrono_model/adapter/upgrade.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def chrono_upgrade_warning
return if upgrade.empty?

logger.warn 'ChronoModel: There are tables needing a structure upgrade, and ChronoModel structures need to be recreated.'
logger.warn 'ChronoModel: Please run ChronoModel.upgrade! to attempt the upgrade. If you have dependant database objects'
logger.warn 'ChronoModel: Please run ChronoModel.upgrade! to attempt the upgrade. If you have dependent database objects'
logger.warn 'ChronoModel: the upgrade will fail and you have to drop the dependent objects, run .upgrade! and create them'
logger.warn 'ChronoModel: again. Sorry. Some features or the whole library may not work correctly until upgrade is complete.'
logger.warn "ChronoModel: Tables pending upgrade: #{upgrade}"
Expand Down

0 comments on commit d9d2837

Please sign in to comment.