[ADD] Added rand_gid/rand_gid2 macro
[ADD] Added DDLs for hive 0.11 or before w/o macros