private static void ProcessType(string type, ICreateTableColumnAsTypeSyntax column) { switch (type) { case "short": case "int16": column.AsInt16(); break; case "int": case "int32": column.AsInt32(); break; case "datetime": column.AsDateTime(); break; case "guid": column.AsGuid(); break; case "string": default: column.AsString(); break; } }
public static ICreateTableColumnOptionOrWithColumnSyntax AsMyDateTime( this ICreateTableColumnAsTypeSyntax createTableColumnAsTypeSyntax) { if (!DbProvider.IsPostgre) { return(createTableColumnAsTypeSyntax.AsDateTime()); } return(createTableColumnAsTypeSyntax.AsCustom("TimestampTz")); }