diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-05 12:07:43 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-05 12:07:43 +0000 |
commit | 872319738757edc0483346c75a2407f7019b963f (patch) | |
tree | d5953edec6184dda1f53c5994c3ebcebc9e815a2 /db | |
parent | 8f764d21b0011056e1492d92afe3bd40b847b9f7 (diff) | |
download | gitlab-ce-872319738757edc0483346c75a2407f7019b963f.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20191127151619_create_gitlab_subscription_histories.rb | 28 | ||||
-rw-r--r-- | db/schema.rb | 17 |
2 files changed, 45 insertions, 0 deletions
diff --git a/db/migrate/20191127151619_create_gitlab_subscription_histories.rb b/db/migrate/20191127151619_create_gitlab_subscription_histories.rb new file mode 100644 index 00000000000..718f2c1b313 --- /dev/null +++ b/db/migrate/20191127151619_create_gitlab_subscription_histories.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +class CreateGitlabSubscriptionHistories < ActiveRecord::Migration[5.2] + DOWNTIME = false + + def up + create_table :gitlab_subscription_histories do |t| + t.datetime_with_timezone :gitlab_subscription_created_at + t.datetime_with_timezone :gitlab_subscription_updated_at + t.date :start_date + t.date :end_date + t.date :trial_ends_on + t.integer :namespace_id, null: true + t.integer :hosted_plan_id, null: true + t.integer :max_seats_used + t.integer :seats + t.boolean :trial + t.integer :change_type, limit: 2 + t.bigint :gitlab_subscription_id, null: false + t.datetime_with_timezone :created_at + end + add_index :gitlab_subscription_histories, :gitlab_subscription_id + end + + def down + drop_table :gitlab_subscription_histories + end +end diff --git a/db/schema.rb b/db/schema.rb index c33223f8b59..c6fa84e96b5 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1828,6 +1828,23 @@ ActiveRecord::Schema.define(version: 2019_12_02_031812) do t.index ["upload_id"], name: "index_geo_upload_deleted_events_on_upload_id" end + create_table "gitlab_subscription_histories", force: :cascade do |t| + t.datetime_with_timezone "gitlab_subscription_created_at" + t.datetime_with_timezone "gitlab_subscription_updated_at" + t.date "start_date" + t.date "end_date" + t.date "trial_ends_on" + t.integer "namespace_id" + t.integer "hosted_plan_id" + t.integer "max_seats_used" + t.integer "seats" + t.boolean "trial" + t.integer "change_type", limit: 2 + t.bigint "gitlab_subscription_id", null: false + t.datetime_with_timezone "created_at" + t.index ["gitlab_subscription_id"], name: "index_gitlab_subscription_histories_on_gitlab_subscription_id" + end + create_table "gitlab_subscriptions", force: :cascade do |t| t.datetime_with_timezone "created_at", null: false t.datetime_with_timezone "updated_at", null: false |