@extends('backend.layouts.app') @section('title', 'Migration Generator') @section('content')
Define columns and modifiers, then generate and run a Laravel migration file instantly.
products).name:type, separated by commas. Add modifiers after additional colons: name:type:modifier1:modifier2(value).id. If you add a field with the same name as the Primary Key, that field will be used instead.string, text, longText, integer, bigInteger, smallInteger, tinyInteger, boolean, decimal(8, 2), float(8, 2), double(8, 2), char(36), date, dateTime, timestamp, json, jsonb, enum(['draft','published']), set(['a','b']), binary, uuid, foreignId.
nullable, unsigned, unique, index, primary, default(value), comment('text'), first, after('column'), useCurrent, charset('utf8mb4'), collation('utf8mb4_unicode_ci'), constrained('users'), cascadeOnDelete, nullOnDelete.
name:string, slug:string:unique, price:decimal(8, 2), stock:integer:default(0), category_id:foreignId:constrained('categories'):cascadeOnDelete
title:string, slug:string:unique, content:longText, status:enum(['draft','published']):default('draft'), author_id:foreignId:constrained('users'):cascadeOnDelete
name:string, email:string:unique, email_verified_at:datetime:nullable, password:string:nullable, role:string:default('user')
order_number:string:unique, user_id:foreignId:constrained('users'):cascadeOnDelete, total:decimal(8, 2):default(0), status:string:default('pending')
Review the migration code before generating.