Welcome Guest, Not a member yet? Register   Sign In
Add dummy content when running migrations
#3

(10-05-2015, 07:09 AM)orionstar Wrote: You can access the $this->db object so you can insert anything what you want with $this->db->insert() or $this->db->update(). Wink

About the timestamp: you have to find out a timestamp what follows the format (YYYYMMDDHHIISS -> 20121031100537) and append the name of the migration. But you should read the docs if you're not lazy... See http://www.codeigniter.com/user_guide/li...ation.html

Thank you for your reply. About the timestamps, I'm afraid you didn't understood me.. The documentation says:

Quote:Each Migration is run in numeric order forward or backwards depending on the method taken.


If I set the migration type to Timestamp, do I have to run
Code:
$this->migration->version(5);

with the timestamp or just the number of the migration ? Also if I have set timestamps to migrations, do I have to generate somehow a timestamp in order to apply in to the name of the file etc? do something like this for instance
PHP Code:
echo date('YmdHis'); 
Reply


Messages In This Thread
RE: Add dummy content when running migrations - by Lykos22 - 10-05-2015, 07:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB