diff options
author | Simon Vocella <voxsim@gmail.com> | 2016-12-27 17:26:57 +0100 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2017-02-28 22:15:39 +0000 |
commit | 81246e5649a8fb9e73369cbd117505a546d7e807 (patch) | |
tree | fa51d0a0d504f25bf1151db6f115e3c8a4ec8ad4 /db | |
parent | 4c4810b35b3b1729865640382b4c7e593f8b876d (diff) | |
download | gitlab-ce-81246e5649a8fb9e73369cbd117505a546d7e807.tar.gz |
manage personal_access_tokens through api
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20161228124936_change_expires_at_to_date_in_personal_access_tokens.rb | 18 | ||||
-rw-r--r-- | db/schema.rb | 2 |
2 files changed, 19 insertions, 1 deletions
diff --git a/db/migrate/20161228124936_change_expires_at_to_date_in_personal_access_tokens.rb b/db/migrate/20161228124936_change_expires_at_to_date_in_personal_access_tokens.rb new file mode 100644 index 00000000000..af1bac897cc --- /dev/null +++ b/db/migrate/20161228124936_change_expires_at_to_date_in_personal_access_tokens.rb @@ -0,0 +1,18 @@ +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class ChangeExpiresAtToDateInPersonalAccessTokens < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + # Set this constant to true if this migration requires downtime. + DOWNTIME = true + DOWNTIME_REASON = 'This migration requires downtime because it alters expires_at column from datetime to date' + + def up + change_column :personal_access_tokens, :expires_at, :date + end + + def down + change_column :personal_access_tokens, :expires_at, :datetime + end +end diff --git a/db/schema.rb b/db/schema.rb index 1d94368f66e..82b4a931069 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -879,7 +879,7 @@ ActiveRecord::Schema.define(version: 20170216141440) do t.string "token", null: false t.string "name", null: false t.boolean "revoked", default: false - t.datetime "expires_at" + t.date "expires_at" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "scopes", default: "--- []\n", null: false |