# Edit History for Projects

**URL:** <https://forum.inductiveautomation.com/t/edit-history-for-projects/10420>\
**Category:** Ignition\
**Created:** [September 1, 2015, 4:01pm UTC](https://forum.inductiveautomation.com/t/edit-history-for-projects/10420 "2015-09-01T16:01:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![scicco](https://avatars.discourse-cdn.com/v4/letter/s/e0b2c6/32.png) [@scicco](https://forum.inductiveautomation.com/u/scicco)\
**Post date:** [September 1, 2015, 4:01pm UTC](https://forum.inductiveautomation.com/t/edit-history-for-projects/10420/1 "2015-09-01T16:01:27Z")

</div>

Hello,

Does anyone know if the information displayed on the Gateway under Configure --\> Projects --\> view --\> Edit History is available anywhere to dump into a database? It appears to only keep a limited amount of history and I’d like to be able to look back and query the edit history of who changed what and when for each project.

I’ve gone through all the files and sub-directories (at least I think I have) under Program Files\Inductive Automation and couldn’t find anything.

Thanks,  
Steve

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [September 1, 2015, 6:06pm UTC](https://forum.inductiveautomation.com/t/edit-history-for-projects/10420/2 "2015-09-01T18:06:18Z")

</div>

Hi scicco,

The information you seek is in Ignition’s internal database.

You can use the [pa.ignition.db.runPrepInternalDBQuery](http://doc.perfectabstractions.com/modules/powerscripting/index.html#scripting-functions-ignition-runprepinternaldbquery) function from the [Power Scripting Module](http://nickmudge.info/post/pa-power-scripting-module) to query Ignition’s internal database any time you want.

Here is an example that gets the last 50 rows of project changes of a specific project, ordered by most recent changes.`query = """
	SELECT 
		p.Name, pg.PROJECTID, pg.EDITCOUNT, pg.EDITTYPE, pg.USERNAME, pg.EDITDATE, pg.EDITDETAILS
	FROM
		PROJECTS p
	JOIN
		PROJECT_CHANGES pg ON pg.PROJECTID=p.PROJECTS_ID
	WHERE 
		p.Name='PerfectChat'
	ORDER BY
		pg.EDITDATE DESC
	LIMIT 50
	"""
result = pa.ignition.db.runPrepInternalDBQuery(query)
print result`Best,

---

<div class="post-metadata">

**Author:** ![scicco](https://avatars.discourse-cdn.com/v4/letter/s/e0b2c6/32.png) [@scicco](https://forum.inductiveautomation.com/u/scicco)\
**Post date:** [September 1, 2015, 7:53pm UTC](https://forum.inductiveautomation.com/t/edit-history-for-projects/10420/3 "2015-09-01T19:53:04Z")

</div>

Thanks Nick. I’ll try to give your module a test spin before the conference.

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [September 1, 2015, 7:55pm UTC](https://forum.inductiveautomation.com/t/edit-history-for-projects/10420/4 "2015-09-01T19:55:04Z")

</div>

Awesome! Let me know if you have comments or questions about it.

Best,
