Add dummy content when running migrations |
(10-05-2015, 02:11 AM)Lykos22 Wrote: Hi all, I'd like some feedback please, if possible. I'm using CI v3 and I was wondering whether there's a way I could enter some dummy content on the tables I generate running through Migrations. You can access the $this->db object so you can insert anything what you want with $this->db->insert() or $this->db->update(). 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 |
Messages In This Thread |
Add dummy content when running migrations - by Lykos22 - 10-05-2015, 02:11 AM
RE: Add dummy content when running migrations - by orionstar - 10-05-2015, 07:09 AM
RE: Add dummy content when running migrations - by Lykos22 - 10-05-2015, 07:30 AM
RE: Add dummy content when running migrations - by orionstar - 10-05-2015, 07:59 AM
|