sdispater / eloquent

The Eloquent ORM provides a simple yet beautiful ActiveRecord implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Schema builder

sdispater opened this issue · comments

Eloquent should have a schema builder in order to create and modify tables.

# Creating table
with Schema.create('users') as table:
    table.increments('id')
    table.string('email')

# Modifying table
with Schema.table('users') as table:
    table.string('email', 50).nullable().change()

# Dropping table
Schema.drop('users')

# Renaming table
Schema.rename('users', 'my_users')