Sha256: 7a47e72b3faa3ec3cac5e8ae4345ab44914ba180b8de2859f63551482dbd1f59
Contents?: true
Size: 699 Bytes
Versions: 13
Compression:
Stored size: 699 Bytes
Contents
# frozen_string_literal: true class CreateActiveRecallTables < ActiveRecord::Migration[5.2] def self.up create_table :active_recall_decks do |t| t.references :user, polymorphic: true t.timestamps end add_index :active_recall_decks, %i[user_id user_type] create_table :active_recall_items do |t| t.references :deck t.references :source, polymorphic: true t.integer :box, default: 0 t.timestamp :last_reviewed t.timestamp :next_review t.timestamps end add_index :active_recall_items, %i[source_id source_type] end def self.down drop_table :active_recall_decks drop_table :active_recall_items end end
Version data entries
13 entries across 13 versions & 1 rubygems