2015-04-17 08:31:24 -04:00
|
|
|
# == Schema Information
|
|
|
|
#
|
2015-05-03 12:05:38 -04:00
|
|
|
# Table name: project_import_data
|
2015-04-17 08:31:24 -04:00
|
|
|
#
|
2015-05-03 12:05:38 -04:00
|
|
|
# id :integer not null, primary key
|
|
|
|
# project_id :integer
|
|
|
|
# data :text
|
2015-04-17 08:31:24 -04:00
|
|
|
#
|
|
|
|
|
|
|
|
require 'carrierwave/orm/activerecord'
|
|
|
|
require 'file_size_validator'
|
|
|
|
|
|
|
|
class ProjectImportData < ActiveRecord::Base
|
|
|
|
belongs_to :project
|
2016-03-21 12:29:19 -04:00
|
|
|
attr_encrypted :credentials, key: Gitlab::Application.secrets.db_key_base, marshal: true, encode: true, mode: :per_attribute_iv_and_salt
|
2016-03-03 12:10:06 -05:00
|
|
|
|
2015-04-17 08:31:24 -04:00
|
|
|
serialize :data, JSON
|
|
|
|
|
|
|
|
validates :project, presence: true
|
2016-04-01 06:04:41 -04:00
|
|
|
|
|
|
|
def stringified_credentials
|
|
|
|
JSON[credentials.to_json]
|
|
|
|
end
|
2015-04-17 08:31:24 -04:00
|
|
|
end
|