summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2018-06-25 15:10:26 +0200
committerJames Lopez <james@jameslopez.es>2018-07-06 15:46:18 +0200
commita2bf1641546a1d3eeb3e9f44734854f655c0adef (patch)
tree0652c20a92513330aa09c4a2ec9adbfaeb3a6494 /db
parentb0fa01fce3822da94aee6264829841996beb6df3 (diff)
downloadgitlab-ce-a2bf1641546a1d3eeb3e9f44734854f655c0adef.tar.gz
Update Import/Export to use object storage (based on aa feature flag)
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20180625113853_create_import_export_uploads.rb16
-rw-r--r--db/schema.rb10
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