mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
nsfw flag and index for site lookup
This commit is contained in:
parent
64126f261c
commit
8e64a3c12c
2 changed files with 18 additions and 0 deletions
9
migrations/008_add_nsfw_flag.rb
Normal file
9
migrations/008_add_nsfw_flag.rb
Normal file
|
@ -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
|
9
migrations/009_add_indexes.rb
Normal file
9
migrations/009_add_indexes.rb
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
Sequel.migration do
|
||||||
|
up {
|
||||||
|
DB.add_index :sites, [:hits, :created_at]
|
||||||
|
}
|
||||||
|
|
||||||
|
down {
|
||||||
|
DB.drop_index :sites, [:hits, :created_at]
|
||||||
|
}
|
||||||
|
end
|
Loading…
Add table
Reference in a new issue