blob: bd219300a13f8581c7ca90cb50a410e288fa9882 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# frozen_string_literal: true
module Gitlab
module Database
module SchemaValidation
module SchemaObjects
class Column
def initialize(adapter)
@adapter = adapter
end
attr_reader :adapter
delegate :name, :table_name, :partition_key?, to: :adapter
def statement
[name, adapter.data_type, adapter.default, adapter.nullable].compact.join(' ')
end
end
end
end
end
end
|