Skip to content

Error message for mismatch between database and project is incorrect #2879

Closed

Description

@hampuslavin

Describe the bug
Error message for mismatch between database and project is incorrect.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new model
  2. Don't run serverpod generate
  3. Create a migration and apply it
  4. Observe error
➜  <project_name>_server: ✗ dart bin/apply_migrations.dart             
SERVERPOD version: 2.1.5, dart: 3.5.3 (stable) (Wed Sep 11 16:22:47 2024 +0000) on "macos_arm64", time: 2024-10-17 12:59:19.871134Z
mode: development, role: maintenance, logging: normal, serverId: default
Applied database migration:
 - 20241017125808036
WARNING: The database does not match the target database:
 - Table "<table_name>" is not like the target database:
 - Missing Index "<unique_idx>".

Expected behavior

  • The warning should be in the other direction. The index does exist in the database but not in the project.
  • A hint to run serverpod generate is probably appropriate

Screenshots
If applicable, add screenshots to help explain your problem.

Serverpod versions

  • CLI Version: 2.1.5
  • Library version: 2.1.5

Activity

  1. added
    area: internal tooling
    on Oct 17, 2024
  2. added
    bug
    on Oct 17, 2024
  3. vanlooverenkoen commented on Nov 25, 2024

    @vanlooverenkoen
    Contributor

    Thanks @hampuslavin indeed a hint to run serverpod generate again would have saved me some time

  4. self-assigned this
    on Dec 16, 2024
  5. moved this from Next 🌟 to Now 🔥 in Serverpod Frameworkson Dec 16, 2024
  6. klkucaj commented on Dec 16, 2024

    @klkucaj
    Contributor

    @hampuslavin I followed all the steps to reproduce the issue but was unable to replicate it. I’m closing this PR for now. If the issue resurfaces later, we can reopen it.

  7. moved this from Now 🔥 to Done 🚀 in Serverpod Frameworkson Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: internal toolingbug

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions