Skip to content

Instantly share code, notes, and snippets.

@kargirwar
Last active November 27, 2017 05:53
Show Gist options
  • Save kargirwar/80ec527b26a3547793dfed007fd1044c to your computer and use it in GitHub Desktop.
Save kargirwar/80ec527b26a3547793dfed007fd1044c to your computer and use it in GitHub Desktop.
<?php
public function change()
{
$table = $this->table('photographers');
$table->addColumn('created-at', 'timestamp', [
'default' => 'CURRENT_TIMESTAMP',
'after' => 'portfolio-url'])
->addColumn('updated-at', 'timestamp', [
'update' => 'CURRENT_TIMESTAMP',
'default' => 'CURRENT_TIMESTAMP',
'after' => 'created-at' ])
->update();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment