Hi. Is there a reason not to attempt this instead through the CLI?
Al Matthews, Software Dev,
Atlanta University Center
________________________________________
From: Code for Libraries [[log in to unmask]] On Behalf Of Rosalyn Metz [[log in to unmask]]
Sent: Wednesday, April 18, 2012 9:23 AM
To: [log in to unmask]
Subject: [CODE4LIB] Archivists' Toolkit: Adding Digital Objects via MySQL
Hi Everyone,
I posted this over on the Archivists' Toolkit listserv and got no response
(yet), so I thought I might try here as well.
I have a large quantity (around 300+) of digital objects that I need to add
to Archivists' Toolkit. I think I've figured out what queries I need to
run in order to do this in MySQL (rather than the interface) but I wanted
to get opinions from the peanut gallery before trying it out on my test
instance.
It seems that there are actually two update queries that need to be used
when creating a Digital Object. They are:
insert into ArchDescriptionInstances
(instanceType, resourceComponentId, resourceId, parentResourceId,
instanceDescriminator, archDescriptionInstancesId)
values
('Digital object', 336673, null, 543, 'digital', 22567003)
and...
insert into DigitalObjects
(version, lastUpdated, created, lastUpdatedBy, createdBy, title,
dateExpression, dateBegin, dateEnd, languageCode, restrictionsApply,
eadDaoActuate, eadDaoShow, metsIdentifier, objectType, label, objectOrder,
componentId, parentDigitalObjectId, archDescriptionInstancesId,
repositoryId)
values
(0, '2012-04-17 12:05:15', '2012-04-17 12:05:15', 'username', 'username',
'title', '1938-1959', null, null, '', 0, 'onRequest', 'new', '678.1829',
'text', '', 0, '', null, 22567003, 1)
There also appears to be some update queries as well, but I'm guessing that
they are less important (please correct me if I'm wrong). Has anyone tried
to do this in the past? If so do you have scripts that will create Digital
Objects for you that you wouldn't mind sharing? Is there anything you
think I should know before testing this out in my test instance of AT? Any
caveats for me?
Any help anyone can provide would be greatly appreciated.
Thanks,
Rosalyn
-----------------------------------------
**************************************************************************************************
The contents of this email and any attachments are confidential.
They are intended for the named recipient(s) only.
If you have received this email in error please notify the system
manager or the
sender immediately and do not disclose the contents to anyone or
make copies.
** IronMail scanned this email for viruses, vandals and malicious
content. **
**************************************************************************************************
|