diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20180625113853_create_import_export_uploads.rb | 16 | ||||
-rw-r--r-- | db/schema.rb | 10 |
2 files changed, 26 insertions, 0 deletions
diff --git a/db/migrate/20180625113853_create_import_export_uploads.rb b/db/migrate/20180625113853_create_import_export_uploads.rb new file mode 100644 index 00000000000..be42304b0ae --- /dev/null +++ b/db/migrate/20180625113853_create_import_export_uploads.rb @@ -0,0 +1,16 @@ +class CreateImportExportUploads < ActiveRecord::Migration + DOWNTIME = false + + def change + create_table :import_export_uploads do |t| + t.datetime_with_timezone :updated_at, null: false + + t.references :project, index: true, foreign_key: { on_delete: :cascade }, unique: true + + t.text :import_file + t.text :export_file + end + + add_index :import_export_uploads, :updated_at + end +end diff --git a/db/schema.rb b/db/schema.rb index 8880ecf4f5c..3e96edb9cb8 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -949,6 +949,16 @@ ActiveRecord::Schema.define(version: 20180702120647) do add_index "identities", ["user_id"], name: "index_identities_on_user_id", using: :btree + create_table "import_export_uploads", force: :cascade do |t| + t.datetime_with_timezone "updated_at", null: false + t.integer "project_id" + t.text "import_file" + t.text "export_file" + end + + add_index "import_export_uploads", ["project_id"], name: "index_import_export_uploads_on_project_id", using: :btree + add_index "import_export_uploads", ["updated_at"], name: "index_import_export_uploads_on_updated_at", using: :btree + create_table "internal_ids", id: :bigserial, force: :cascade do |t| t.integer "project_id" t.integer "usage", null: false |