Esempio n. 1
0
 public string[] GenerateDropScripts(Configuration config)
 {
     return(new [] { DdlScriptGenerator.GetDialect(config).GetDropTableString(_tableName) });
 }
Esempio n. 2
0
        public string[] GenerateCreateScripts(Configuration config)
        {
            var defaultSchema = config.GetProperty(NHibernate.Cfg.Environment.DefaultSchema);
            var tableName     = !string.IsNullOrEmpty(defaultSchema) ? defaultSchema + "." + _tableName : _tableName;

            return(new[]
            {
                string.Format("create table {0} ( {1} {2} );", tableName, _columnName, DdlScriptGenerator.GetDialect(config).GetTypeName(NHibernate.SqlTypes.SqlTypeFactory.Int64)),
                string.Format("insert into {0} values ( {1} )", tableName, _initialValue)
            });
        }