Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
oil generate: setting table columns default / null value?
  • Hi,
    when using the oil generate command, for instance:
    $ php oil g model posts title:string date_created:date body:text author:varchar[50]
    

    by default oil generates a table in the DB where all the columns are NOT NULL, no default value.
    I couldn't find much info about the oil generate syntax in the docs, so my question is : are there more parameters that you can pass in the oil generate command line to make some columns NULL by default or give them some default value? Or do I have to change that afterwards?
  • No, there aren't. The commandline would become way too complex if there were. Oil generates the basic structure, you will have to modify the generated files manually if they need tweaking and you can't solve that by modifying the templates.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion