So I’m testing migration to my new Kaltura environment and generally things are fine. I’ve run into one thing that I didn’t account for, though.
I need to be able to set the created date on entries that are imported via CSV to match the created date on the system I’m coming from. I don’t see that this is really supported in the CSV import, so I may have to come up with some other ways, perhaps editing the operational kaltura DB directly. I may be wrong there, I have not tried it yet.
Does anyone know if this is supported in the CSV import? If not, are there perhaps some ill-effects of setting the createdAt date in the Kaltura operational database directly
You cannot set entry.created_at to anything other than time() when using the API because:
/opt/kaltura/app/alpha/lib/model/om/Baseentry.php
public function preInsert(PropelPDO $con = null)
{
$this->setCreatedAt(time());
$this->setUpdatedAt(time());
return parent::preInsert($con);
}
Updating the entry.created_at column directly should work just fine but note that the column is of type datetime so the value should be a UNIX timestamp [epoch].
Once done, you will also need to reindex Sphinx’s kaltura_entry table.
In order to do so, please run:
Thanks for the reply, @jess! The approach of modifying the created_at column in the entry table , then reindexing Sphinx’s kaltura_entry table using the script seems to work fine.