Replies: 1 comment
-
This is definitely a Future thing ™️ - the very first version of schemas had an adapter for Sequelize but it was using Joi for validation and did not have type inference. Technically any JSON schema to database model converter should work but as with most other converters (and why the schema project exists) there does not seem to be a lot of good choices. Which is kind of odd because I think basic conversion should be somewhat straightforward. I was seeing for an adapter to ship with basic schema conversion and then being able to add additional adapter specific things: import { tableFromSchema } from 'feathers-knex'
import { userSchema } from '../schema/users'
knex.schema.createTable('users', tableFromSchema(userSchema, table => {
table.timestamps()
table.foreign('account').references('accountId').inTable('accounts');
})) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been reading a lot about Feathers Schema, and I'm very interested. However, I haven't been able to find anything that talks about how it would be used with database adapters.
For instance, I like to use Sequelize via feathers-sequelize. Is it possible to define a schema and have my Sequelize models generated? If not, is that a Future™️ thing? Or is that beyond Schema's intended scope?
Either way, it's an excellent project and I'm excited to see where it goes.
Beta Was this translation helpful? Give feedback.
All reactions