# Upgrading Ghost v3 -\> v4 fails with "Table '\*.products' doesn't exist"

**URL:** <https://forum.ghost.org/t/upgrading-ghost-v3-v4-fails-with-table-products-doesnt-exist/23671>\
**Category:** Installation\
**Created:** [June 23, 2021, 10:53am UTC](https://forum.ghost.org/t/upgrading-ghost-v3-v4-fails-with-table-products-doesnt-exist/23671 "2021-06-23T10:53:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Loketony\_X](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/loketony_x/32/5758_2.png) [@Loketony\_X](https://forum.ghost.org/u/Loketony_X)\
**Post date:** [June 23, 2021, 10:53am UTC](https://forum.ghost.org/t/upgrading-ghost-v3-v4-fails-with-table-products-doesnt-exist/23671/1 "2021-06-23T10:53:05Z")

</div>

**To reproduce:**

Set up Mysql:

```auto
CREATE DATABASE ghost3;
CREATE USER 'ghost'@'localhost' IDENTIFIED WITH mysql_native_password BY '***';
GRANT create, delete, insert, select, update, alter, references ON ghost3.* TO 'ghost'@'localhost';
FLUSH PRIVILEGES;

```

Create a Ghost installation:

```auto
ghost install v3 --local --development --no-start \
	--db mysql --dbhost localhost --dbuser ghost --dbpass '***' --dbname ghost3

```

**Btw;** Using the switch `--verbose` will cause the installation to fail with **stdout maxBuffer exceeded**

In non-verbose mode the Ghost installation will work as expected and is possible to view and configure at `http://localhost:2368/ghost/`.

Update with:

```auto
ghost stop
ghost update --verbose

```

Everything seems fine, and `ghost doctor` gives you no errors, but starting it up with `ghost start` will give you this error:

```auto
A GhostError occurred.

Message: Ghost was able to start, but errored during boot with: show columns from `products` - ER_NO_SUCH_TABLE: Table 'ghost3.products' doesn't exist

Debug Information:
    OS: macOS, v11.4
    Node Version: v14.17.1
    Ghost Version: 4.8.0
    Ghost-CLI Version: 1.17.3
    Environment: development
    Command: 'ghost start'

```

Funny thing is that running `ghost doctor` at this stage still gives **no errors**.

---

<div class="post-metadata">

**Author:** ![Loketony\_X](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/loketony_x/32/5758_2.png) [@Loketony\_X](https://forum.ghost.org/u/Loketony_X)\
**Post date:** [June 23, 2021, 11:17am UTC](https://forum.ghost.org/t/upgrading-ghost-v3-v4-fails-with-table-products-doesnt-exist/23671/2 "2021-06-23T11:17:54Z")

</div>

FYI; Did a fresh install of Ghost v4 with:

```auto
ghost install --local --development --verbose --no-start \
        --db mysql --dbhost localhost --dbuser ghost --dbpass '***' --dbname ghost4

```

Started it up and then I compared tables with the failed version 3-one and found that not only the **products** table was missing, also:

```auto
members_email_change_events
members_login_events
members_paid_subscription_events
members_payment_events
members_products
members_status_events
members_subscribe_events
stripe_prices
stripe_products

```

I’ve searched the verbose log looking for database errors but found none.

---

<div class="post-metadata">

**Author:** ![castaway](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/castaway/32/13857_2.png) [@castaway](https://forum.ghost.org/u/castaway)\
**Post date:** [June 27, 2021, 7:03pm UTC](https://forum.ghost.org/t/upgrading-ghost-v3-v4-fails-with-table-products-doesnt-exist/23671/3 "2021-06-27T19:03:39Z")

</div>

I had quite a lotta “fun” upgrading ghost on mysql - you will probably see more output / fails if you run it with this set in the environment:  
`DEBUG="knex-migrator:*,knex:query"`

Look for “Rolling” in the resulting output, my guess is it tried to create a table and rolled back for some reason (mine did that many many times). Post the results.
