Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
UserAdminV2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
庄欣
UserAdminV2
Commits
e2b7d65c
Commit
e2b7d65c
authored
Oct 26, 2012
by
Anahkiasen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added migrate:rebuild command to clean and reconstruct the database
Signed-off-by: Anahkiasen <ehtnam6@gmail.com>
parent
205cc486
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
laravel/cli/tasks/migrate/migrator.php
+19
-0
laravel/documentation/database/migrations.md
+4
-0
No files found.
laravel/cli/tasks/migrate/migrator.php
View file @
e2b7d65c
...
...
@@ -140,6 +140,25 @@ class Migrator extends Task {
}
/**
* Reset the database to pristine state and run all migrations
*
* @param array $arguments
* @return void
*/
public
function
rebuild
()
{
// Clean the database
$this
->
reset
();
echo
PHP_EOL
;
// Re-run all migrations
$this
->
migrate
();
echo
'The database was successfully rebuilt'
.
PHP_EOL
;
}
/**
* Install the database tables used by the migration system.
*
* @return void
...
...
laravel/documentation/database/migrations.md
View file @
e2b7d65c
...
...
@@ -70,3 +70,7 @@ When you roll back a migration, Laravel rolls back the entire migration "operati
**Roll back all migrations that have ever run:**
php artisan migrate:reset
**Roll back everything and run all migrations again:**
php artisan migrate:rebuild
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment