statamic-rad-pack / runway

Eloquently manage your database models in Statamic.
https://statamic.com/addons/rad-pack/runway
MIT License
113 stars 49 forks source link

Resource blueprints with unexpected fieldtypes bork the generated migration. #327

Closed edalzell closed 1 year ago

edalzell commented 1 year ago

Description

I have a resource that has a custom fieldtype in it and Runway created a faulty migration for it.

It generated this:

$table->('generate_profile');

IMO, when it finds one it can't figure out, it shouldn't write it at all to the migration and inform the user about it so they can handle manually.

Steps to reproduce

  1. Add a custom blueprint field
  2. Generate the migration.

Environment

Environment Application Name: Zakat Foundation of America Laravel Version: 10.23.0 PHP Version: 8.2.10 Composer Version: 2.5.5 Environment: local Debug Mode: ENABLED URL: zakat.test Maintenance Mode: OFF

Cache Config: NOT CACHED Events: NOT CACHED Routes: NOT CACHED Views: NOT CACHED

Drivers Broadcasting: log Cache: statamic Database: mysql Logs: daily Mail: smtp Queue: sync Session: file

Statamic Addons: 12 Antlers: runtime Stache Watcher: Disabled Static Caching: Disabled Version: 4.21.0 PRO

Statamic Addons aryehraber/statamic-captcha: 1.10.0 aryehraber/statamic-impersonator: 2.6.0 doublethreedigital/runway: 5.2.2 edalzell/forma: 2.1 jonassiewertsen/statamic-livewire: 2.12.0 statamic/seo-pro: 5.2.2 transformstudios/events: 5.0.1 transformstudios/front: 2.0.4 transformstudios/github: dev-main transformstudios/neon: dev-feature/update-orphan-profile transformstudios/review: 4.1.0 transformstudios/simple: 4.7.2

duncanmcclean commented 1 year ago

What does that field look like in your blueprint?

It should have either not created the migration OR created the migration with a TODO for you to add the column yourself.

edalzell commented 1 year ago
         -
            handle: generate_profile
            field:
              type: generate_profile