# Upgrading a 1.3 instance of CakePHP - database question

**URL:** <https://discourse.cakephp.org/t/upgrading-a-1-3-instance-of-cakephp-database-question/11843>\
**Category:** Need Help\
**Created:** [February 1, 2024, 3:47pm UTC](https://discourse.cakephp.org/t/upgrading-a-1-3-instance-of-cakephp-database-question/11843 "2024-02-01T15:47:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lemmy](https://avatars.discourse-cdn.com/v4/letter/l/f19dbf/32.png) [@Lemmy](https://discourse.cakephp.org/u/Lemmy)\
**Post date:** [February 1, 2024, 3:47pm UTC](https://discourse.cakephp.org/t/upgrading-a-1-3-instance-of-cakephp-database-question/11843/1 "2024-02-01T15:47:44Z")

</div>

Hi all, I have been tasked with adding new features to a legacy CakePHP site, v1.3.11. It looks like I will have to ‘upgrade’ or more accurately rewrite the app before I can look at developing it further.

I wondered if I can start updating the models and controllers while preserving the existing database? The project is an archive which connects to other apps and if possible I would prefer to avoid redesigning or significantly changing the existing data design.

Any additional tips on how to approach this task would be appreciated. I haven’t used CakePHP in earnest before.

---

<div class="post-metadata">

**Author:** ![dreamingmind](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/dreamingmind/32/1857_2.png) [@dreamingmind](https://discourse.cakephp.org/u/dreamingmind)\
**Post date:** [February 1, 2024, 4:27pm UTC](https://discourse.cakephp.org/t/upgrading-a-1-3-instance-of-cakephp-database-question/11843/2 "2024-02-01T16:27:24Z")

</div>

You could get a fair idea by [baking](https://book.cakephp.org/bake/3/en/index.html) a new app from the existing db.

This would give you simple CRUD environment to look around in.

A successful bake is going to depend on some [naming conventions](https://book.cakephp.org/5/en/intro/conventions.html#database-convention-summary) in your db. There are ways to get around the conventions if you accept that those work-arounds are going to cascade through your code to some degree defeating the ‘magic’ of the framework.

Another thing I would personally do. I’d get all the CREATE TABLE statements for my db and use them to create an initial-state migration with [Phinx](https://book.cakephp.org/phinx/0/en/index.html).

Though you don’t want to change your schema…

---

<div class="post-metadata">

**Author:** ![Lemmy](https://avatars.discourse-cdn.com/v4/letter/l/f19dbf/32.png) [@Lemmy](https://discourse.cakephp.org/u/Lemmy)\
**Post date:** [February 1, 2024, 7:24pm UTC](https://discourse.cakephp.org/t/upgrading-a-1-3-instance-of-cakephp-database-question/11843/3 "2024-02-01T19:24:54Z")

</div>

Thanks, this is a useful starting point for my investigations.
