Skip to content

Laravel migration untuk tukar table column field type

Run command berikut

Edit file migration TukarFieldTypeTableParcel.php seperti berikut

Function Up()

Function Down()

*Unsigned() – Bertujuan memastikan nilai integer berkenaan bukan negative

*Sila pastikan type untuk setiap foreginer field dan reference field adalah sama.



Published inICT

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *