diff options
author | ThibG <thib@sitedethib.com> | 2019-09-06 12:06:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-06 12:06:59 +0200 |
commit | 286bf110c3e69042049968440f1eb99372a7e0e6 (patch) | |
tree | ddf1c32803022cb200087a8c4c6818612ca76d3b /db | |
parent | 0128509605ed90ee5a29d6af2347ab32bd46aeb9 (diff) | |
parent | 4434e2eb7f9942b44561c2f7702af3ed3854b8db (diff) |
Merge pull request #1211 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20190901035623_add_max_score_to_tags.rb | 6 | ||||
-rw-r--r-- | db/post_migrate/20190901040524_remove_score_from_tags.rb | 12 | ||||
-rw-r--r-- | db/schema.rb | 6 |
3 files changed, 21 insertions, 3 deletions
diff --git a/db/migrate/20190901035623_add_max_score_to_tags.rb b/db/migrate/20190901035623_add_max_score_to_tags.rb new file mode 100644 index 000000000..f936e9871 --- /dev/null +++ b/db/migrate/20190901035623_add_max_score_to_tags.rb @@ -0,0 +1,6 @@ +class AddMaxScoreToTags < ActiveRecord::Migration[5.2] + def change + add_column :tags, :max_score, :float + add_column :tags, :max_score_at, :datetime + end +end diff --git a/db/post_migrate/20190901040524_remove_score_from_tags.rb b/db/post_migrate/20190901040524_remove_score_from_tags.rb new file mode 100644 index 000000000..a1112700b --- /dev/null +++ b/db/post_migrate/20190901040524_remove_score_from_tags.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +class RemoveScoreFromTags < ActiveRecord::Migration[5.2] + disable_ddl_transaction! + + def change + safety_assured do + remove_column :tags, :score, :int + remove_column :tags, :last_trend_at, :datetime + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 328506b50..f15f33bea 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2019_08_23_221802) do +ActiveRecord::Schema.define(version: 2019_09_01_040524) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -677,14 +677,14 @@ ActiveRecord::Schema.define(version: 2019_08_23_221802) do t.string "name", default: "", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.integer "score" t.boolean "usable" t.boolean "trendable" t.boolean "listable" t.datetime "reviewed_at" t.datetime "requested_review_at" t.datetime "last_status_at" - t.datetime "last_trend_at" + t.float "max_score" + t.datetime "max_score_at" t.index "lower((name)::text)", name: "index_tags_on_name_lower", unique: true end |