Scaffold file templates

This commit is contained in:
Maximilian Grundke
2016-06-09 22:38:19 +02:00
parent 8158d60d30
commit 1cd879bcb6
16 changed files with 183 additions and 1 deletions

View File

@ -0,0 +1,10 @@
class CreateFileTemplates < ActiveRecord::Migration
def change
create_table :file_templates do |t|
t.string :name
t.text :content
t.belongs_to :file_type
t.timestamps
end
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20160512131539) do
ActiveRecord::Schema.define(version: 20160609185708) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -101,6 +101,14 @@ ActiveRecord::Schema.define(version: 20160512131539) do
t.datetime "updated_at"
end
create_table "file_templates", force: true do |t|
t.string "name"
t.text "content"
t.integer "file_type_id"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "file_types", force: true do |t|
t.string "editor_mode"
t.string "file_extension"