Setup support - How to setup not using Sequelize

I’m trying use forest admin on my server.
I’m using Nodejs, Postgress but no sequlize.
We don’t have any ORM instead we are using http://knexjs.org/
Is that supported?

Hi @Gal_Saada,

knex.js is not something we support for now , but this it is something that should be achievable using smart collections (Doc) with some code.

Also, because of lumber, you should still be able to generate a brand new project independant of your first one using a direct postgresql connection. Lumber handle most of the work for your related to Sequelize and you would end up we 2 separate project.

Let me know if that helps :pray:

Hey @jeffladiray,
That works great my only question regarding it, is how should I update the separated project?
For example I created new table in my source project what should I do to update the new schema in the new project?

Hi @Gal_Saada ,

For now, lumber is not able to perform an update of your models. Subsequent updates are manual.
The good news is we are working on the update command and it’s close to be released (in weeks)

Best

1 Like

@Sliman_Medini Thank you for the quick response.
I’ve an issue with created at Field.

This is how I created the table:

This is how it’s configured in Lumber:

This is the error I see on local server:

This is the error I see on client side:

Hello @Gal_Saada,

It looks like knex.fn.now() in your code is associated to a timestamp, but the lumber way associate it to a date.
Maybe you could investigate from this. Are you sure a timestamp value has been passed, not a date object/string?

Let me know :wink:

@Guillaume_Cisco Thanks for the quick response
As far as I know Sequlizese support Date for timestamp

As I can see from your screen:
TIMESTAMP WITH TIME ZONE for postgres, does the data you are sending includes a time zone?

Let me know :slight_smile:

I’m changing different attribute.

If I understood correctly, you are having an issue while editing a record on a field which is not createdAt ?

Would you mind trying to switch the defaultValue of created at from
defaultValue: "CURRENT_TIMESTAMP"
to
defaultValue: sequelize.literal('CURRENT_TIMESTAMP')
or even defaultValue: Sequelize.fn('NOW') ?

Let me know if that helps

Hey @jeffladiray Both of the solutions work for me.
Can you please push this fix on your end? so the next time I’ll generate the project it won’t override the changes.

Thanks

I’m also able to reproduce this issue, I’ll open a ticket on our end. I’ll link this thread to the ticket so we will keep you updated once fixed.