1
0
This repository has been archived on 2023-12-07. You can view files and clone it, but cannot push or open issues or pull requests.
body_tracking/db/migrate/002_create_sources.rb
cryptogopher 0b549b909a Added Sources model + controller
commands:
rails generate redmine_plugin_model body_tracking source
project:references name:string description:text
rails generate redmine_plugin_controller body_tracking sources index
create destroy
2019-09-23 14:45:13 +02:00

11 lines
253 B
Ruby

class CreateSources < ActiveRecord::Migration
def change
create_table :sources do |t|
t.references :project, index: true, foreign_key: true
t.string :name
t.text :description
end
add_index :sources, :project_id
end
end