Ruby on Railsのacts_as_listプラグインを使用するときはposition列を :null => false にしてはならない

Ruby on Railsのacts_as_listプラグインを使用するときはposition列を :null => false にしてはならない。

acts_as_list: Don’t use “:null => false” for the position column

migrationで、position列にnot null制約を付与すると、

t.integer :position, :null => false

レコードを削除したときに

SQLite3::SQLException: SQL logic error or missing database:

というエラーになる。

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください