Database error

Hello there,

I am using mySQL and nodejs, and have been trying to setup my remote live server but am having problems with the database side of things.

When I was applying latest database changes to my live server, a couple were having issues such as:

I have applied the rest of the changes that do so without error and left 4 or 5 that are giving errors similar to above.

Now in the development server I am getting this error when clicking on my database:

And when deploying into my remote server it now fails and I see this message in the system check tab:

network wappler-compose_proxy declared as external, but could not be found

I am really struggling with this as my experience is very limited - so any help or pointers would be hugely appreciated!

Thanks,

Leo

Hi,

Would you be able to run the same MySQL version on both local and live server?

If the versions were equal, you wouldn’t see that error (as you were able to apply that change on your local server in first place).

Edit: Can you post here that change/migration file? So we can see if we can edit the precision there from 255 to 65

I’m not sure how to fix this, but I’ve seen someone with this error as well. I suggest searching the forum to see if you find a solution for this. However, I suggest first solving the 1st issue

Hi Apple,

Thank you so much for responding - I have found myself putting off important tasks because I can’t get the database to work!

I seem to have fixed the below error message by restoring the .wappler file from a backup folder:
network wappler-compose_proxy declared as external, but could not be found

So now the database remains the issue - I have now reset changes history on my development server so that is all fine, but the remote server is many many changes behind and still won’t allow me to apply latest changes due to various issues such as the %_fees one I sent a screenshot of.

The change / migration file for that one it is struggling to do is as follows:

exports.up = function(knex) {
  return knex.schema
    .table('user_investments', async function (table) {
      table.decimal('%_fees', 255).alter();
    })

};

exports.down = function(knex) {
  return knex.schema
    .table('user_investments', async function (table) {
      table.integer('%_fees', 255).alter();
    })
};

Thanks so much for your help.

Leo

Could this not be stemming from the field name “%_fees”. As % is a sql wildcard it may be causing a conflict somewhere.
Try renaming to percentage_fees

It seems to me this might’ve caused by changing the field type from integer to decimal, and it kept the default precision for integer instead of the default precision for decimal

Yeah the impression I get is that this is causing the problem - but in messing around with the change events I have a mismatch between my development server and the live server.

Is there a way I can almost wipe the database in the live server and do a fresh migration of the database as it is now from the development server?

Thanks so much!

Are you using a control panel? You can access phpMyAdmin and delete all tables there :slight_smile:

I’m really sorry I don’t know what either of those things are!

I am using nodejs and using the Wappler database manager to organise it all. Is there something I can do within there?

My live database is within a cluster in digital ocean - so do I need to make the changes in there?

Thanks,

Leo

No worries! Sounds like you’re using the standard approach, without a control panel.

I currently lack the time to provide further help, but I’m sure others will jump in to help you :slight_smile:

1 Like

Thanks Brian.

I will try this, but at this point where I have reset changes history in the development server and in the live server there are many many changes not taken place - I am not sure where the changes should be made?

I am hoping to remove the database entirely from the live server and migrate the current state of the development server over to start a fresh. Is that possible?

I’m using nodejs and digital ocean.

Thanks