Skip to content

schema.sql not being updated with most current version/schema definitions #43

@nesfandi

Description

@nesfandi

To reproduce:

  • houseplant generate "test_users_table"
  • cat test_users_table.yml:
 version: "20250311155058"
name: test_users_table
table: test_users

development: &development
  up: |
    CREATE TABLE {table} (
      id UInt64,
      name String
    ) ENGINE = MergeTree()
    ORDER BY id
    SETTINGS storage_policy='gcs_main'
  down: |
    DROP TABLE {table}

test:
  <<: *development

production:
  up: |
  down: |
    DROP TABLE {table}
  • houseplant migrate:up

  • Results from houseplant migrate:status

Database: default
┏━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┓
┃ Status ┃ Migration ID   ┃ Migration Name   ┃
┡━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━┩
│   up   │ 20250311155058 │ test users table │
└────────┴────────────────┴──────────────────┘
  • cat schema.sql
-- version: 0

Would be nice to have a command to manually update schema.sql if need be. Other than that, really enjoy the project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions