summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorValery Sizov <vsv2711@gmail.com>2015-04-15 17:51:34 +0300
committerValery Sizov <vsv2711@gmail.com>2015-04-15 17:51:34 +0300
commit6f5904035606504f557616b3957598f2918587fa (patch)
tree920d25c15f067707c2876793aa7ed1fcd79db3b0 /db
parent475158fec68d3071bcbd0377133b6ac0d9710136 (diff)
downloadgitlab-ci-6f5904035606504f557616b3957598f2918587fa.tar.gz
Job soft deletion
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20150415142013_add_deleted_at_to_jobs.rb6
-rw-r--r--db/schema.rb4
2 files changed, 9 insertions, 1 deletions
diff --git a/db/migrate/20150415142013_add_deleted_at_to_jobs.rb b/db/migrate/20150415142013_add_deleted_at_to_jobs.rb
new file mode 100644
index 0000000..7a825a2
--- /dev/null
+++ b/db/migrate/20150415142013_add_deleted_at_to_jobs.rb
@@ -0,0 +1,6 @@
+class AddDeletedAtToJobs < ActiveRecord::Migration
+ def change
+ add_column :jobs, :deleted_at, :datetime
+ add_index :jobs, :deleted_at
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index e194f7a..65a1032 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20150330001111) do
+ActiveRecord::Schema.define(version: 20150415142013) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -81,8 +81,10 @@ ActiveRecord::Schema.define(version: 20150330001111) do
t.boolean "build_tags", default: false, null: false
t.string "job_type", default: "parallel"
t.string "refs"
+ t.datetime "deleted_at"
end
+ add_index "jobs", ["deleted_at"], name: "index_jobs_on_deleted_at", using: :btree
add_index "jobs", ["project_id"], name: "index_jobs_on_project_id", using: :btree
create_table "projects", force: true do |t|