2023-06-20 00:43:36 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Gitlab
|
|
|
|
module Database
|
|
|
|
module SchemaValidation
|
|
|
|
module SchemaObjects
|
|
|
|
class Column
|
|
|
|
def initialize(adapter)
|
|
|
|
@adapter = adapter
|
|
|
|
end
|
|
|
|
|
|
|
|
attr_reader :adapter
|
|
|
|
|
2023-07-09 08:55:56 +05:30
|
|
|
delegate :name, :table_name, :partition_key?, to: :adapter
|
2023-06-20 00:43:36 +05:30
|
|
|
|
|
|
|
def statement
|
|
|
|
[name, adapter.data_type, adapter.default, adapter.nullable].compact.join(' ')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|