Skip to content

Commit a010831

Browse files
committed
Drop term After 1999
1 parent 173b765 commit a010831

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class DropTermAfter1999 < ActiveRecord::Migration[7.0]
2+
def up
3+
facet = Facet.find_by!(name: 'Decade')
4+
exec_delete("DELETE FROM terms WHERE facet_id = #{facet.id} and value = 'After 1999' and ord = 15")
5+
end
6+
7+
def down
8+
facet = Facet.find_by!(name: 'Decade')
9+
Term.create!(facet: facet, value: "After 1999", ord: 15)
10+
end
11+
end

db/schema.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
# It's strongly recommended that you check this file into your version control system.
1212

13-
ActiveRecord::Schema[7.0].define(version: 2025_09_30_230620) do
13+
ActiveRecord::Schema[7.0].define(version: 2025_10_01_223022) do
1414
# These are extensions that must be enabled in order to support this database
1515
enable_extension "plpgsql"
1616

0 commit comments

Comments
 (0)