feathersjs / feathers

The API and real-time application framework
https://feathersjs.com
MIT License
15.04k stars 751 forks source link

[Feathers v5] Hard to migrate table scheme #3225

Closed ilomon10 closed 1 year ago

ilomon10 commented 1 year ago

I'm confuse with the schema, when use feathers previously (not v5), the table migration is so easy with "models", we just run development mode to setup the database tables.

Now i so confuse how to migrate the table schema on this latest version.

I tried the knex migration, but it didnt work

Steps to reproduce

  1. Create knex migration file knex migrate:make
  2. write some code to create table on that file
    
    // 20230506160731_users.js

/**

/**

3. run `knex migration:latest`, it shows error
```bash
The migration directory is corrupt, the following files are missing: 20230506160731_users.js
Error: The migration directory is corrupt, the following files are missing: 20230506160731_users.js

System configuration

Tell us about the applicable parts of your setup.

Module versions (especially the part that's not working):

NodeJS version: 14.21.1

Operating System: Ubuntu Desktop

Browser Version: Chrome Latest

ilomon10 commented 1 year ago

I just solve by remove knex_* table on database, and make new migration file.

After long research, now i know the procedure to use this latest version.

Maybe there is a clear tutorial or complete guide to use this version.