class CreateTrainingWatchSources < ActiveRecord::Migration[7.1] def change create_table :training_watch_sources do |t| t.string :name, null: false t.string :url, null: false t.string :kind, null: false, default: "html" # html | rss (optional) t.string :match_regex # optional: überschreibt Default-Matcher t.string :last_etag t.string :last_modified t.datetime :last_checked_at t.boolean :enabled, null: false, default: true t.timestamps end add_index :training_watch_sources, :enabled add_index :training_watch_sources, :url, unique: true end end