blob: 34b11375506f8611d9bec0ae3a8e7174c50494d4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#include "object.h"
namespace NKikimr::NMetadata::NModifications {
Ydb::Table::CreateTableRequest TBaseObject::AddHistoryTableScheme(const Ydb::Table::CreateTableRequest& baseScheme, const TString& tableName) {
Ydb::Table::CreateTableRequest result = baseScheme;
result.add_primary_key("historyInstant");
result.set_path(tableName);
{
auto& column = *result.add_columns();
column.set_name("historyAction");
column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::STRING);
}
{
auto& column = *result.add_columns();
column.set_name("historyUserId");
column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::STRING);
}
{
auto& column = *result.add_columns();
column.set_name("historyInstant");
column.mutable_type()->mutable_optional_type()->mutable_item()->set_type_id(Ydb::Type::UINT64);
}
return result;
}
}
|