diff options
author | Sean McGivern <sean@gitlab.com> | 2016-08-18 22:45:41 +0100 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2016-08-18 22:45:41 +0100 |
commit | 883b96ab6a77175d9bac7f03c325428327359cdd (patch) | |
tree | 82a9af364b06994820b975cef45d98adf3255523 /db | |
parent | d2cd9d96965722cca06792c63d76d2704366d7a5 (diff) | |
download | gitlab-ce-883b96ab6a77175d9bac7f03c325428327359cdd.tar.gz |
Allow project group links to be expired
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20160818205718_add_expires_at_to_project_group_links.rb | 29 | ||||
-rw-r--r-- | db/schema.rb | 3 |
2 files changed, 31 insertions, 1 deletions
diff --git a/db/migrate/20160818205718_add_expires_at_to_project_group_links.rb b/db/migrate/20160818205718_add_expires_at_to_project_group_links.rb new file mode 100644 index 00000000000..0ed538b0df8 --- /dev/null +++ b/db/migrate/20160818205718_add_expires_at_to_project_group_links.rb @@ -0,0 +1,29 @@ +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class AddExpiresAtToProjectGroupLinks < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + # Set this constant to true if this migration requires downtime. + DOWNTIME = false + + # When a migration requires downtime you **must** uncomment the following + # constant and define a short and easy to understand explanation as to why the + # migration requires downtime. + # DOWNTIME_REASON = '' + + # When using the methods "add_concurrent_index" or "add_column_with_default" + # you must disable the use of transactions as these methods can not run in an + # existing transaction. When using "add_concurrent_index" make sure that this + # method is the _only_ method called in the migration, any other changes + # should go in a separate migration. This ensures that upon failure _only_ the + # index creation fails and can be retried or reverted easily. + # + # To disable transactions uncomment the following line and remove these + # comments: + # disable_ddl_transaction! + + def change + add_column :project_group_links, :expires_at, :date + end +end diff --git a/db/schema.rb b/db/schema.rb index ae6433494d0..02964d71351 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: 20160810142633) do +ActiveRecord::Schema.define(version: 20160818205718) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -780,6 +780,7 @@ ActiveRecord::Schema.define(version: 20160810142633) do t.datetime "created_at" t.datetime "updated_at" t.integer "group_access", default: 30, null: false + t.date "expires_at" end create_table "project_import_data", force: :cascade do |t| |