Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

What is Jiraschema?

manikanta ch December 16, 2020

Hello all,

I am trying to migrate the attachments from one instance to another instance by following the below document. 

https://confluence.atlassian.com/jirakb/bulk-import-attachments-to-jira-server-issues-via-rest-api-729750741.html

I am trying to run the below script in MSSQL DB but I am not able to figure out the jiraschema of our system.

SELECT ( CAST('mv ' AS nvarchar(18)) + CAST(<jiraschema>.project.originalkey AS nvarchar(18)) + '' + CAST(<jiraschema>.jiraissue.issuenum AS nvarchar(18)) + '/' + CAST(<jiraschema>.fileattachment.ID asASnvarchar(18)) + ' "' + <jiraschema>.project.originalkey + '' + CAST(<jiraschema>.jiraissue.issuenum AS nvarchar(18)) + '/' + filename + '"' ) AS command FROM <jiraschema>.fileattachment JOIN <jiraschema>.jiraissue ON <jiraschema>.fileattachment.issueid = <jiraschema>.jiraissue.id JOIN <jiraschema>.project ON <jiraschema>.jiraissue.project = <jiraschema>.project.id WHERE <jiraschema>.project.pkey = 'ABC'

I need to replace jiraschema in the above Query with our system jirascheme. Can you help me to, How should I know Jiraschema of our system?

Thanks in advance,

ch

2 answers

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 17, 2020

I would very strongly recommend that you move away from the database.  There's an error and an incorrect assumption in your query that means you'll be getting completely the wrong thing from it.

0 votes
Tinker Fadoua
Community Champion
December 17, 2020

@manikanta ch 

Attachments are not saved in the DB. Good suggestion always run select statements on your DB never try anything else.

Attachment folder is in the Home Directory. Depending on your OS you should be able to migrate the folder from one server to the other.

Best,

Fadoua

Suggest an answer

Log in or Sign up to answer