Skip to content

Commit

Permalink
doc(egdecase): added paragraph about store and db changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Scrunshes committed Feb 9, 2017
1 parent 34f237f commit 1c02dbc
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions doc/edge-cases.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@
When straying away from best-practises you might find yourself struggling to understand what's happening.
This document is an attempt to help you catch these edge-cases.

## Store and database changes

Wetland can be a bit picky if you don't know its inner-working.
One error you can rapidly encounter is this one :

```bash
ER_BAD_TABLE_ERROR: Unknown table 'my_database.table-name'
```

The source of this error is most probably a change in your store settings (e.g: changing database adapter, changing database name...) or database (e.g: recreating your database).
Technically what's happening is that wetland doesn't know that it needs to update the database schema because the way migrations work is by looking at your [snapshots](https://wetland.spoonx.org/snapshots.html) in your `.data` directory, and the last snapshot wetland knows about was before your change.

Solution is simple type clear your `.data` directory : `rm -r .data`.

## Dev migrations
Wetland migrations are pretty powerful, but have some minor limitations.

Expand Down

0 comments on commit 1c02dbc

Please sign in to comment.