webNeat/lumen-generators

Disabling timestamps in wn:resource

denizdogan opened this issue · 7 comments

Is there any way to generate resources with public $timestamps = false; on the models and similar for the migration?

Hello,

I am working on version 2.0 of the generators and I will try to make it possible 😄

TCB13 commented

@webNeat any timeline for this version 2.0? Thank you!

Hello @TCB13 , I have just released version 1.2.0 But unfortunately I didn't include this feature as there was others requested before.

TCB13 commented

@webNeat thanks for the update, I'll be waiting for this feature on a next release, this would be really helpful!

version 1.3.0 released containing this feature. Enjoy!

TCB13 commented

@webNeat awesome! you rock! Was this documented?

Yes sure, I updated the README.

In summary:

  • to generate a model without timestamps you do:
wn:model ... --timestamps=false
  • migrations are generated without additional columns by default now. when needed, these columns (including timestamps) can be specified using the --add option:
wn:migration ... --add=timestamps,softDeletes
  • the same --add option was added to wn:resource as well as the yaml structure for wn:resources