-
-
Notifications
You must be signed in to change notification settings - Fork 122
Closed
Labels
Description
Describe the bug
I got an error when I tried to generate a migration after I modified an existing resource attributes
MIX_ENV=test mix ash_postgres.generate_migrations --apis AshPostgres.Test.Api
I get this error:
** (SyntaxError) nofile:18: unexpected token: ":" (column 17, code point U+003A)
(elixir 1.10.4) lib/code.ex:654: Code.format_string!/2
lib/migration_generator/migration_generator.ex:332: AshPostgres.MigrationGenerator.write_migration/4
(elixir 1.10.4) lib/enum.ex:789: anonymous fn/3 in Enum.each/2
(stdlib 3.12.1) maps.erl:232: :maps.fold_1/3
(elixir 1.10.4) lib/enum.ex:2127: Enum.each/2
(mix 1.10.4) lib/mix/task.ex:330: Mix.Task.run_task/3
(mix 1.10.4) lib/mix/cli.ex:82: Mix.CLI.run_task/2.
To Reproduce
- add a new attribute
new_fieldto an existing resourcePostintest/support/resources/posts.ex - generate a migration using
ash_postgres.generate_migrationstask
Expected behavior
it should create a new migration file to alter table :posts, adding column :new_field correctly
** Runtime
- Elixir 1.10.4
- Erlang/OTP 22
- Ash version 1.19
- postgres (PostgreSQL) 12.2