tattersoftware / codeigniter4-schemas

Database schema management, for CodeIgniter 4
MIT License
22 stars 10 forks source link

How to use this package? #32

Open kenjis opened 2 years ago

kenjis commented 2 years ago

I read README, but I don't get how to use this package.

I ran php spark schemas, but all I got is the messagesuccess.

https://github.com/tattersoftware/codeigniter4-schemas#features

View your entire database mapped out in a cascading structure Get helpful advice on optimizations to your database structure with schema analysis Backup, restore, or deploy an entire database structure between servers or environments Generate CodeIgniter 4 migration files from an existing database

How?

MGatner commented 2 years ago

If you want to view the generated Schema it will appear in your Debug Toolbar, or you can output it to CLI using php spark schemas -print.

Not all of the items you mentioned are completed - see the "Development" section at the end of the README. I started on Migration publishing (see the publish-migration branch) but the client project that needed it ran out of funds so I moved to other priorities. There is a lot that could still be done here but ultimately my needs for this library were to support Tatter\Relations - so while I still intend to finish this some day it is not a currently a priority.

MGatner commented 2 years ago

@kenjis Did I answer your question?

kenjis commented 2 years ago

Do you mean Migration publishing is generating migration files from an existing database? There are a lot of technical terms in the README, and I can't get what exactly means. So it is difficult to understand this package.

I just wanted to try "Generate CodeIgniter 4 migration files from an existing database1", but it is not implemented yet.

kenjis commented 2 years ago

All the features marked as 1 are not implemented yet, right? https://github.com/tattersoftware/codeigniter4-schemas#features

MGatner commented 2 years ago

That's correct. I can update the README to be a bit more clear. This package is old and needs some refreshing. It was my main focus for a while but I took a job with a client that caused me to drop active development so many of those planned features are in limbo.

Migration Publishing was the next feature. I started work on it, you can check out the publish-migration branch. I don't recall how much more had to be done.