westonganger / active_snapshot

Simplified snapshots and restoration for ActiveRecord models and associations with a transparent white-box implementation
MIT License
103 stars 16 forks source link

Error when running CreateSnapshotsTable migration #23

Closed travisdock closed 1 year ago

travisdock commented 1 year ago

Rails 7.0.3.1 Ruby 3.0.3 mysql2 0.5.3

I ran rails generate active_snapshot:install and when I ran the resulting migration it failed with wrong number of arguments (given 2, expected 1) I removed the brackets so that it now reads create_table :snapshots, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci" do |t| and everything works as expected. I don't know if there was an update in syntax. It appears create_table only expects one hash argument.

I can open a PR if you want me to but thought I would open this as an issue first.

Update: Closed by #24

westonganger commented 1 year ago

Yes a PR would be appreciated. Thanks