From 04ea8a8d27c78d55b59ebca5ad6ca5204bda6e8d Mon Sep 17 00:00:00 2001 From: Julien Verneuil Date: Tue, 29 Mar 2016 20:12:04 +0200 Subject: [PATCH] add fixed width for datetime, time, date fields with auto_now and auto_now_add attributes --- calexium_lib | 2 +- src/generation/columns.anubis | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/calexium_lib b/calexium_lib index c5c6fea..daf7d84 160000 --- a/calexium_lib +++ b/calexium_lib @@ -1 +1 @@ -Subproject commit c5c6fea11ac3b6df26fe7b7650f1a647731fb6dc +Subproject commit daf7d84b972b0f4ef2a35fcf9b48101417a7110d diff --git a/src/generation/columns.anubis b/src/generation/columns.anubis index 6b17ec7..b8165f7 100644 --- a/src/generation/columns.anubis +++ b/src/generation/columns.anubis @@ -208,20 +208,20 @@ public define Maybe(String) date_field(attrs) then if attrs is { none then success("date(\""+to_upper(name)+"\", \""+name+"\", "+type_name+"."+name+".date, "+to_Anubis_source(help)+")"), - auto_now then success("information(\""+to_upper(name)+"\", \""+name+"\", "+type_name+"."+name+".date, "+to_Anubis_source(help)+")"), - auto_now_add then success("information(\""+to_upper(name)+"\", \""+name+"\", "+type_name+"."+name+".date, "+to_Anubis_source(help)+")") + auto_now then success("information(\""+to_upper(name)+"\", \""+name+"\", "+type_name+"."+name+".date, 10, "+to_Anubis_source(help)+")"), + auto_now_add then success("information(\""+to_upper(name)+"\", \""+name+"\", "+type_name+"."+name+".date, 10, "+to_Anubis_source(help)+")") }, time_field(attrs) then if attrs is { none then success("time(\""+to_upper(name)+"\", \""+name+"\", "+type_name+"."+name+".time, "+to_Anubis_source(help)+")"), - auto_now then success("information(\""+to_upper(name)+"\", \""+name+"\", "+type_name+"."+name+".time, "+to_Anubis_source(help)+")"), - auto_now_add then success("information(\""+to_upper(name)+"\", \""+name+"\", "+type_name+"."+name+".time, "+to_Anubis_source(help)+")") + auto_now then success("information(\""+to_upper(name)+"\", \""+name+"\", "+type_name+"."+name+".time, 10, "+to_Anubis_source(help)+")"), + auto_now_add then success("information(\""+to_upper(name)+"\", \""+name+"\", "+type_name+"."+name+".time, 10, "+to_Anubis_source(help)+")") }, datetime_field(attrs) then if attrs is { none then success("datetime(\""+to_upper(name)+"\", \""+name+"\", "+type_name+"."+name+".datetime, "+to_Anubis_source(help)+")"), - auto_now then success("information(\""+to_upper(name)+"\", \""+name+"\", "+type_name+"."+name+".datetime, "+to_Anubis_source(help)+")"), - auto_now_add then success("information(\""+to_upper(name)+"\", \""+name+"\", "+type_name+"."+name+".datetime, "+to_Anubis_source(help)+")") + auto_now then success("information(\""+to_upper(name)+"\", \""+name+"\", "+type_name+"."+name+".datetime, 18, "+to_Anubis_source(help)+")"), + auto_now_add then success("information(\""+to_upper(name)+"\", \""+name+"\", "+type_name+"."+name+".datetime, 18, "+to_Anubis_source(help)+")") }, foreign_key(app,foreign_table) then success("foreign_text(\""+to_upper(name)+"\", \""+name+"\", "+type_name+"."+name+", vt_edit_selector(get_selector_"+foreign_table+"), "+to_Anubis_source(help)+")"), integer_field then success("integer(\""+to_upper(name)+"\", \""+name+"\", "+type_name+"."+name+", "+to_Anubis_source(help)+")"), -- libgit2 0.21.4