how do i deal with a migration file for testing ?

Discussion for various published PHP frameworks, including Zend Framework, CodeIgniter, Kohana, CakePHP, Yii, Symfony, and others.

Moderator: General Moderators

Post Reply
User avatar
gautamz07
Forum Contributor
Posts: 331
Joined: Wed May 14, 2014 12:18 pm

how do i deal with a migration file for testing ?

Post by gautamz07 »

Just had a question about migration , was reading the link here:

http://laravel.com/docs/5.1/migrations,

now suppose i create a table just for testing something random in my application , say i do something like:

Code: Select all

php artisan migrate:make create_testing_fileupload
now once i am done testing obviously i don't want this file to be in my project do i drop the table from the database, but the file is still there, so do i just delete the file ? because obviously when i push the project to git or some version control system, i don't want the guy haveing a migration file that was just meant for testing and then for him/her to have an additional unwanted table in their database.

so basically how do i deal with a migration file that was just meant for testing ?

Thank you.
Gautam.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: how do i deal with a migration file for testing ?

Post by Celauran »

If it was a temporary table just for use in development, I'd either create it by hand rather than writing a migration for it at all, or just delete the migration before deploying.
User avatar
gautamz07
Forum Contributor
Posts: 331
Joined: Wed May 14, 2014 12:18 pm

Re: how do i deal with a migration file for testing ?

Post by gautamz07 »

Well , thats all i wanted to know :D ... thanks
Post Reply