Answers for "how to make migration a new that create tables"

1

make migration with model

php artisan make:model -m <Model name>
Posted by: Guest on January-15-2021
-1

how database migration work

class CreateProducts < ActiveRecord::Migration[5.0]
  def change
    create_table :products do |t|
      t.string :name
      t.text :description
 
      t.timestamps
    end
  end
end
Posted by: Guest on October-13-2020

Code answers related to "how to make migration a new that create tables"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language