Skip to content

Commit

Permalink
[DB-9765] Use BIGINT for autogenerated columns
Browse files Browse the repository at this point in the history
  • Loading branch information
Alberto Massari committed Mar 20, 2015
1 parent 14b888d commit b669113
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ConsoleSample/HelloDB.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void CreateTable()
{
using (DbCommand command = connection.CreateCommand())
{
command.CommandText = "create table names (id int generated always as identity primary key, name string)";
command.CommandText = "create table names (id bigint generated always as identity primary key, name string)";
command.ExecuteNonQuery();
Console.Out.WriteLine("The table 'NAMES' was created.");
}
Expand Down Expand Up @@ -79,7 +79,7 @@ public void AddNames()
string columnName = reader.GetName(0);
while (reader.Read())
{
Console.Out.WriteLine("New id={0} for column {1}", reader.GetInt32(0), columnName);
Console.Out.WriteLine("New id={0} for column {1}", reader.GetInt64(0), columnName);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion NUnitEFCodeFirstTestProject/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ internal static void CreateHockeyTable()
}
DbCommand createCommand = new NuoDbCommand("create table Hockey" +
"(" +
" Id Integer not NULL generated always as identity primary key," +
" Id bigint not NULL generated always as identity primary key," +
" Number Integer," +
" Name String," +
" Position String," +
Expand Down
2 changes: 1 addition & 1 deletion NUnitTestProject/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ internal static void CreateHockeyTable()
DropTable(connection, "hockey");
DbCommand createCommand = new NuoDbCommand("create table Hockey" +
"(" +
" Id Integer not NULL generated always as identity primary key," +
" Id bigint not NULL generated always as identity primary key," +
" Number Integer," +
" Name String," +
" Position String," +
Expand Down

0 comments on commit b669113

Please sign in to comment.