Example #1
0
 public function __construct(Table $table)
 {
     $this->table = $table;
     $table->datetime('created_at')->setDefault('CURRENT_TIMESTAMP');
     $table->datetime('updated_at');
     $table->datetime('deleted_at');
 }
Example #2
0
 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;
 }
Example #3
0
 public function __construct(Table $table)
 {
     $this->table = $table;
     $table->datetime('deleted_at');
 }
Example #4
0
 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();
 }
Example #5
0
 public function __construct(Table $table)
 {
     $this->table = $table;
     $table->integer('order');
 }
Example #6
0
 public function __construct(Table $table)
 {
     $this->table = $table;
     $table->boolean('hidden');
 }