Skip to content

backfilling plugin_schema_migrations broken plugin_schema_migrations already exists #2

@joemoore

Description

@joemoore

On our project we collapsed our migrations, and after the first migration runs we have a plugin_schema_info table that looks like this:

  +----------------+---------+
  | plugin_name    | version |
  +----------------+---------+
  | tags           |       3 |
  | user           |      17 |
  +----------------+---------+

We also have an empty plugin_schema_migrations table.

Later, we run the following:

  class UpgradeUserPluginTo18 < ActiveRecord::Migration
    def self.up
      migrate_plugin('user', 18)
    end
  ...

The code on line 6 of lib/desert/plugin_migrations/2.1/extensions/schema_statements.rb blows up and the exception is eaten silently when the plugin_schema_migrations already exists. The plugin versions are not backfilled and the User plugin migrations run from migration 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions