diff --git a/migrations/008_add_nsfw_flag.rb b/migrations/008_add_nsfw_flag.rb new file mode 100644 index 00000000..36b5ec53 --- /dev/null +++ b/migrations/008_add_nsfw_flag.rb @@ -0,0 +1,9 @@ +Sequel.migration do + up { + DB.add_column :sites, :is_nsfw, :boolean, default: false + } + + down { + DB.add_column :sites, :is_nsfw + } +end \ No newline at end of file diff --git a/migrations/009_add_indexes.rb b/migrations/009_add_indexes.rb new file mode 100644 index 00000000..c49c58a1 --- /dev/null +++ b/migrations/009_add_indexes.rb @@ -0,0 +1,9 @@ +Sequel.migration do + up { + DB.add_index :sites, [:hits, :created_at] + } + + down { + DB.drop_index :sites, [:hits, :created_at] + } +end \ No newline at end of file