Skip to content

Missing support for SET and CREATE DOMAIN #2

Description

@kianmeng

I've tried the instructions in the README doc using the SportsDB but got this error.

Steps to reproduce the error.

Prepare sample DB.

$ unzip sportsdb_sample_postgresql.zip
$ sudo -u postgres createdb sportsdb_sample
$ sudo -u postgres psql -d sportsdb_sample -f sportsdb_sample_postgresql_20080304.sql

Dump schema.

$ pg_dump --schema-only --no-owner postgres://dbuser:dbpass@localhost/sportsdb_sample > sportsdb_sample.schema.sql

Create migration files.

$ mix ecto.extract.migrations --sql-file sportsdb_sample.schema.sql                                                                                                 
Compiling 31 files (.ex)                                                                                             
Generated ecto_extract_migrations app
UNKNOWN 8> SET statement_timeout = 0;
UNKNOWN 9> SET lock_timeout = 0;
UNKNOWN 10> SET idle_in_transaction_session_timeout = 0;
UNKNOWN 11> SET client_encoding = 'UTF8';
UNKNOWN 12> SET standard_conforming_strings = on;
UNKNOWN 13> SELECT pg_catalog.set_config('search_path', '', false);
UNKNOWN 14> SET check_function_bodies = false;
UNKNOWN 15> SET xmloption = content;
UNKNOWN 16> SET client_min_messages = warning;
UNKNOWN 17> SET row_security = off;
UNKNOWN 23> CREATE DOMAIN public.primary_id AS integer;
UNKNOWN 26> SET default_tablespace = '';
UNKNOWN 28> SET default_with_oids = false;
** (Protocol.UndefinedError) protocol Enumerable not implemented for nil of type Atom
    (elixir 1.10.3) lib/enum.ex:1: Enumerable.impl_for!/1
    (elixir 1.10.3) lib/enum.ex:141: Enumerable.reduce/3
    (elixir 1.10.3) lib/enum.ex:3383: Enum.reduce/3
    lib/mix/tasks/ecto_extract_migrations.ex:67: Mix.Tasks.Ecto.Extract.Migrations.run/1
    (mix 1.10.3) lib/mix/task.ex:330: Mix.Task.run_task/3
    (mix 1.10.3) lib/mix/cli.ex:82: Mix.CLI.run_task/2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions