diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-06-17 12:38:49 -0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-06-17 14:29:11 -0300 |
commit | e5aa902860fcc2380fd25a6a4f0736dae159eba3 (patch) | |
tree | ba3c678a476bc7153490da412ebd64223c155c1c /db/migrate | |
parent | ab236c76247d83c190b148acbffa48f244414553 (diff) | |
parent | ae4491b42181f7195199fd6ac9273891d6e48263 (diff) | |
download | gitlab-ce-e5aa902860fcc2380fd25a6a4f0736dae159eba3.tar.gz |
Merge master into issue_12758issue_12758
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20160415062917_create_personal_access_tokens.rb | 13 | ||||
-rw-r--r-- | db/migrate/20160615142710_add_index_on_requested_at_to_members.rb | 9 | ||||
-rw-r--r-- | db/migrate/20160616084004_change_project_of_environment.rb | 21 | ||||
-rw-r--r-- | db/migrate/20160617301627_add_events_to_notification_settings.rb (renamed from db/migrate/20160614301627_add_events_to_notification_settings.rb) | 0 |
4 files changed, 43 insertions, 0 deletions
diff --git a/db/migrate/20160415062917_create_personal_access_tokens.rb b/db/migrate/20160415062917_create_personal_access_tokens.rb new file mode 100644 index 00000000000..ce0b33f32bd --- /dev/null +++ b/db/migrate/20160415062917_create_personal_access_tokens.rb @@ -0,0 +1,13 @@ +class CreatePersonalAccessTokens < ActiveRecord::Migration + def change + create_table :personal_access_tokens do |t| + t.references :user, index: true, foreign_key: true, null: false + t.string :token, index: { unique: true }, null: false + t.string :name, null: false + t.boolean :revoked, default: false + t.datetime :expires_at + + t.timestamps null: false + end + end +end diff --git a/db/migrate/20160615142710_add_index_on_requested_at_to_members.rb b/db/migrate/20160615142710_add_index_on_requested_at_to_members.rb new file mode 100644 index 00000000000..63f7392e54f --- /dev/null +++ b/db/migrate/20160615142710_add_index_on_requested_at_to_members.rb @@ -0,0 +1,9 @@ +class AddIndexOnRequestedAtToMembers < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + disable_ddl_transaction! + + def change + add_concurrent_index :members, :requested_at + end +end diff --git a/db/migrate/20160616084004_change_project_of_environment.rb b/db/migrate/20160616084004_change_project_of_environment.rb new file mode 100644 index 00000000000..cc1daf9b621 --- /dev/null +++ b/db/migrate/20160616084004_change_project_of_environment.rb @@ -0,0 +1,21 @@ +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class ChangeProjectOfEnvironment < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + # 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 + change_column_null :environments, :project_id, true + end +end diff --git a/db/migrate/20160614301627_add_events_to_notification_settings.rb b/db/migrate/20160617301627_add_events_to_notification_settings.rb index 609596f45e4..609596f45e4 100644 --- a/db/migrate/20160614301627_add_events_to_notification_settings.rb +++ b/db/migrate/20160617301627_add_events_to_notification_settings.rb |