📕
Sprnva Docs
  • Introduction
  • What's New?
  • Installation
    • Requirements
    • Download Sprnva zip no composer required
    • Install Sprnva Using Composer
    • Setup Config
  • Deployment
  • File Structure
  • Database
    • Select
    • SelectLoop
    • Insert
    • Update
    • Delete
    • Query
    • Seeder
    • Paginate
    • With
    • andFilter
    • withCount
    • get
  • Query Builder
  • Migration
    • INSTANCES
      • NEW
      • RENAMETABLE
      • DROP
      • CHANGE
    • DUMPS
      • dump
      • dump prune
    • MAKE
    • MIGRATE
      • migrate
      • migrate fresh
    • ROLLBACK
  • Routing
    • with parameter
    • multiple parameters
    • with closure
    • group
    • controller grouping
  • Controllers
    • methods
  • Views
    • Passing Parameters
  • Validation
    • validate
      • validation type
  • Authentication
  • Alert Messages
  • Default Helpers
  • CSRF Protection
  • Email
  • Packages
    • Fortify
  • Themes and Templates
Powered by GitBook
On this page
  1. Migration

MAKE

This will add a new migration file base on the default migration stub. Migration stub contains the scaffolding of the migration file.

${{ varName }} = [
	"mode" => "",
	"table"	=> "",
	"primary_key" => "",
	"up" => [
		"" => ""
	],
	"down" => [
		"" => ""
	]
];
  • {{ varName }} will be automatically replaced by the migration file name you enter in the input before you click the make button.

  • The dabase/migrations/ is the directory which our migration files will be stored. This is we called our local repository.

The migration file accepts:

  1. mode: "NEW", "DROP", "CHANGE", "RENAMETABLE"

  2. table: the target table

  3. primary_key: the primary key of the table

  4. up: Run the migrations

  5. down: Reverse the migrations

Previousdump pruneNextMIGRATE

Last updated 2 years ago