public function __construct(Table $table) { $this->table = $table; $table->datetime('created_at')->setDefault('CURRENT_TIMESTAMP'); $table->datetime('updated_at'); $table->datetime('deleted_at'); }
public function morphtable($table, $morph, $suffix = '_morphs') { $morphtable = new Table($table . $suffix); $this->tables[] = $morphtable; $morphtable->id('id'); $morphtable->integer($morph)->references($table); $morphtable->varchar('morph_id'); $morphtable->integer('poly_id'); return $morphtable; }
public function __construct(Table $table) { $this->table = $table; $table->datetime('deleted_at'); }
protected function buildOldKeySql(Cache $cache, Table $table, Constraint $key) { $cachedConstraint = $cache->getConstraint($key->getName(), $table->getName()); $type = $cachedConstraint['type'] == 'PRIMARY KEY' ? 'PRIMARY' : $cachedConstraint['type'] . ' KEY'; return $type . ' ' . $key->getName(); }
public function __construct(Table $table) { $this->table = $table; $table->integer('order'); }
public function __construct(Table $table) { $this->table = $table; $table->boolean('hidden'); }