import at.clockwork.terminal.domain.*

import grails.util.Holders

class UpdateScriptService {

	def terminalDatafoxWriteService = Holders.grailsApplication.mainContext.getBean 'terminalDatafoxWriteService'

	def run(def connection, def dataSourceFields) {

        TerminalDatafox
            .findAllWhere(isUsed:false, deleted:false)
            .each { TerminalDatafox itTerminalDatafox ->

            itTerminalDatafox.isUsed = true
            terminalDatafoxWriteService.save(itTerminalDatafox)

        }

		true

	}
}