2021-01-13 19:07:38 +00:00
|
|
|
defmodule Pleroma.Repo.Migrations.DataMigrationCreatePopulateHashtagsTable do
|
|
|
|
use Ecto.Migration
|
|
|
|
|
|
|
|
def up do
|
|
|
|
dt = NaiveDateTime.utc_now()
|
|
|
|
|
|
|
|
execute(
|
|
|
|
"INSERT INTO data_migrations(name, inserted_at, updated_at) " <>
|
|
|
|
"VALUES ('populate_hashtags_table', '#{dt}', '#{dt}') ON CONFLICT DO NOTHING;"
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
2021-01-31 19:03:59 +00:00
|
|
|
def down do
|
|
|
|
execute("DELETE FROM data_migrations WHERE name = 'populate_hashtags_table';")
|
|
|
|
end
|
2021-01-13 19:07:38 +00:00
|
|
|
end
|