У меня есть проект, в котором база данных имеет красное смещение, и я использую адаптер Postgrex в своем проекте phoenix, локально я использую postgresql, и все работает нормально, но когда я развертываю и пытаюсь запустить миграцию, я получаю эту ошибку.
15:39:27.201 [error] Could not create schema migrations table. This error usually happens due to the following:
* The database does not exist
* The "schema_migrations" table, which Ecto uses for managing
migrations, was defined by another library
* There is a deadlock while migrating (such as using concurrent
indexes with a migration_lock)
To fix the first issue, run "mix ecto.create".
To address the second, you can run "mix ecto.drop" followed by
"mix ecto.create". Alternatively you may configure Ecto to use
another table for managing migrations:
config :my_service, MyService.Repo,
migration_source: "some_other_table_for_schema_migrations"
The full error report is shown below.
▸ Given the following expression: Elixir.MyService.StartupTasks.init()
▸ The remote call failed with:
▸ ** (exit) %Postgrex.Error{connection_id: 5598, message: nil, postgres: %{code: :feature_not_supported, file: "/home/ec2-user/padb/src/pg/src/backend/commands/tablecmds.c", line: "3690", message: "timestamp or timestamp with time zone column do not support precision.", pg_code: "0A000", routine: "xen_type_size_from_attr", severity: "ERROR"}, query: nil}
▸ (ecto_sql) lib/ecto/adapters/sql.ex:629: Ecto.Adapters.SQL.raise_sql_call_error/1
▸ (elixir) lib/enum.ex:1336: Enum."-map/2-lists^map/1-0-"/2
▸ (ecto_sql) lib/ecto/adapters/sql.ex:716: Ecto.Adapters.SQL.execute_ddl/4
▸ (ecto_sql) lib/ecto/migrator.ex:633: Ecto.Migrator.verbose_schema_migration/3
▸ (ecto_sql) lib/ecto/migrator.ex:477: Ecto.Migrator.lock_for_migrations/4
▸ (ecto_sql) lib/ecto/migrator.ex:401: Ecto.Migrator.run/4
▸ (my_service) lib/my_service/startup_tasks.ex:11: MyService.StartupTasks.migrate/0
▸ (stdlib) erl_eval.erl:680: :erl_eval.do_apply/6
Кажется, что redshift не поддерживает некоторые типы данных, которые поддерживает postgres, поэтому есть лучший способ сделать это или я могу создать свою собственную таблицу миграции схемы с другой отметкой времени