Skip to content

Commit 9bebfc2

Browse files
committed
Fixed usage of deprecated methods
1 parent 78ad05c commit 9bebfc2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ydb-cookbook/src/main/java/tech/ydb/examples/simple/AlterTable.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
package tech.ydb.examples.simple;
22

33
import java.time.Duration;
4+
45
import tech.ydb.core.grpc.GrpcTransport;
56
import tech.ydb.examples.SimpleExample;
67
import tech.ydb.table.Session;
78
import tech.ydb.table.TableClient;
89
import tech.ydb.table.description.TableColumn;
910
import tech.ydb.table.description.TableDescription;
1011
import tech.ydb.table.settings.AlterTableSettings;
11-
import tech.ydb.table.values.OptionalType;
1212
import tech.ydb.table.values.PrimitiveType;
1313

1414

@@ -42,8 +42,8 @@ protected void run(GrpcTransport transport, String pathPrefix) {
4242

4343
session.alterTable(tablePath, new AlterTableSettings()
4444
.setTraceId("some-trace-id")
45-
.addColumn("name", OptionalType.of(PrimitiveType.Text))
46-
.addColumn("age", OptionalType.of(PrimitiveType.Uint32))
45+
.addNullableColumn("name", PrimitiveType.Text)
46+
.addNullableColumn("age", PrimitiveType.Uint32)
4747
.dropColumn("value")
4848
).join().expectSuccess("cannot alter table");
4949

0 commit comments

Comments
 (0)