Clone the repo, install dependencies with composer, seed your database with fake data, then serve with development server. As commands:
git clone https://github.com/EduFocal/api.git composer install php artisan db:seed php artisan serve
vendor/bin/behat -c tests/behat/behat.yml
This document is my scratchpad for now, and is not definitive of the final API. It will change without notice.
- List by (teacher, subject, topic, id, list of ids, status)
Migrate Legacy Auto-increment IDs to GUIDS
Want to use GUIDs for all resources. Will have to plan and implement a migration from the existing integer-based IDs to guids.
- Add uid column to all tables
- Run migrations to set all these new uids
- Add foreign key columns for these new uids in corresponding tables, such as (topic_uid)
- Update all topic_uids to match the primary keys by cross-referencing with the integer-based ids
- Set uid keys as primary and foreign keys and remove contraints from integer-based keys
- Drop the integer-based ids and rename all uid columns to be id (and topic_id, respectively)
- Implement Eloquent-based models that support uid keys naturally
Steps 1 to 6 should be automated and repeatable as a migration step.
Build the new API based on these guid keys.