PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Fri Nov 15, 2019 4:47 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Wed Dec 09, 2015 9:14 am 
Offline
Forum Contributor

Joined: Thu Apr 16, 2015 7:55 am
Posts: 110
Hello There,

I'm working on laravel4.2

I created a migration file as:
Syntax: [ Download ] [ Hide ]
php artisan migrate:make create_sample_group --create=sample_group --path=app/database/migrations/illumina/
 

Before running the above command I create folder illumina in app/migration

After running the migrate command, I can see file as 2015_12_09_084943_create_sample_group.php
That is today's name, etc

I make a, b, c changes for column names in it. And would like to create respective table which can be done by:

Syntax: [ Download ] [ Hide ]
artisan migrate
 

But I'd like to specify to which database laravel should create this table. Is there a way to do so?

My database.php looks like:
Syntax: [ Download ] [ Hide ]

'default' => 'alpha',

'connections' => array(
'alpha' => array(
            'driver' => 'mysql',
            'host' => 'localhost',
            'database' => 'alpha_1',
            'username' => 'root',
            'password' => '',
            'charset' => 'utf8',
            'collation' => 'utf8_unicode_ci',
            'prefix' => '',
        ),

        'pqr_1' => array(
            'driver' => 'mysql',
            'host' => 'localhost',
            'database' => 'pqr',
            'username' => 'root', //      
            'password' => '',
            'charset' => 'utf8',
            'collation' => 'utf8_unicode_ci',
            'prefix' => '',
        ),
//and so on multiple databases
////
)

 

I'd like to create table in database pqr_1

I don't see documentation of it at

http://laravel.com/docs/4.2/migrations# ... migrations
Looking forward for guidance.


Top
 Profile  
 
PostPosted: Wed Dec 09, 2015 10:15 am 
Offline
Forum Contributor

Joined: Thu Apr 16, 2015 7:55 am
Posts: 110


Top
 Profile  
 
PostPosted: Mon Feb 08, 2016 11:34 pm 
Offline
Forum Newbie

Joined: Thu Feb 04, 2016 2:19 am
Posts: 7
Hey,I'm sharing a link just check this " http://www.sitepoint.com/laravel-migrations/ ".

Hope you find it relevant.
Good luck


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group