这是indexloc提供的服务,不要输入任何密码
Skip to content

cli: allow passing sql by flag to migrate create #5026

@scriptonist

Description

@scriptonist

Add two flags --up-sql and --down-sql to the hasura migrate create command. The contents of this flag should be used to fill in the up.sql and down.sql files of the created migration.

When either one of them is not provided show a warning.

Eg:

hasura migrate create <migration_name> --up-sql "CREATE TABLE article(id serial NOT NULL, title text NOT NULL, content text NOT NULL, rating integer NOT NULL, author_id serial NOT NULL, PRIMARY KEY (id));" --down-sql "DROP TABLE article;"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions