public static void OnInitialize(EventArgs args) { database = Database.InitDb("Statistics"); tshock = Database.InitDb("tshock"); var table = new SqlTable("Statistics", new SqlColumn("ID", MySqlDbType.Int32) { Unique = true, Primary = true, AutoIncrement = true }, new SqlColumn("UserID", MySqlDbType.Int32) { Unique = true }, new SqlColumn("Time", MySqlDbType.Int32), new SqlColumn("PlayerKills", MySqlDbType.Int32), new SqlColumn("Deaths", MySqlDbType.Int32), new SqlColumn("MobKills", MySqlDbType.Int32), new SqlColumn("BossKills", MySqlDbType.Int32), new SqlColumn("Logins", MySqlDbType.Int32), new SqlColumn("MobDamageGiven", MySqlDbType.Int32), new SqlColumn("BossDamageGiven", MySqlDbType.Int32), new SqlColumn("PlayerDamageGiven", MySqlDbType.Int32), new SqlColumn("DamageReceived", MySqlDbType.Int32)); var table2 = new SqlTable("Highscores", new SqlColumn("ID", MySqlDbType.Int32) { Unique = true, Primary = true, AutoIncrement = true }, new SqlColumn("UserID", MySqlDbType.Int32) { Unique = true }, new SqlColumn("Score", MySqlDbType.Int32)); var table3 = new SqlTable("KillingSpree", new SqlColumn("ID", MySqlDbType.Int32) { Unique = true, Primary = true, AutoIncrement = true }, new SqlColumn("UserID", MySqlDbType.Int32), new SqlColumn("StartSpree", MySqlDbType.Text), new SqlColumn("Deleted", MySqlDbType.Int32), new SqlColumn("Player", MySqlDbType.Int32), new SqlColumn("Mob", MySqlDbType.Int32), new SqlColumn("Boss", MySqlDbType.Int32), new SqlColumn("Combined", MySqlDbType.Int32)); database.EnsureExists(table, table2); database.EnsureExists(table3); }
private void OnInitialize(EventArgs args) { database = Database.InitDb("Statistics"); tshock = Database.InitDb("tshock"); var table = new SqlTable("Statistics", new SqlColumn("UserID", MySqlDbType.Int32), new SqlColumn("Time", MySqlDbType.Int32), new SqlColumn("Logins", MySqlDbType.Int32), new SqlColumn("UserName", MySqlDbType.Text), new SqlColumn("UserGroup", MySqlDbType.Text)); database.EnsureExists(table); }
private void OnInitialize(EventArgs args) { database = Database.InitDb("Statistics"); tshock = Database.InitDb("tshock"); var table = new SqlTable("Statistics", new SqlColumn("ID", MySqlDbType.Int32) { Unique = true, Primary = true, AutoIncrement = true }, new SqlColumn("UserID", MySqlDbType.Int32) { Unique = true }, new SqlColumn("Time", MySqlDbType.Int32), new SqlColumn("PlayerKills", MySqlDbType.Int32), new SqlColumn("Deaths", MySqlDbType.Int32), new SqlColumn("MobKills", MySqlDbType.Int32), new SqlColumn("BossKills", MySqlDbType.Int32), new SqlColumn("Logins", MySqlDbType.Int32), new SqlColumn("MobDamageGiven", MySqlDbType.Int32), new SqlColumn("BossDamageGiven", MySqlDbType.Int32), new SqlColumn("PlayerDamageGiven", MySqlDbType.Int32), new SqlColumn("DamageReceived", MySqlDbType.Int32)); var table2 = new SqlTable("Highscores", new SqlColumn("ID", MySqlDbType.Int32) { Unique = true, Primary = true, AutoIncrement = true }, new SqlColumn("UserID", MySqlDbType.Int32) { Unique = true }, new SqlColumn("Score", MySqlDbType.Int32)); database.EnsureExists(table, table2); //database.Import(); }
private void OnInitialize(EventArgs args) { database = Database.InitDb("Statistics"); tshock = Database.InitDb("tshock"); var table = new SqlTable("Statistics", new SqlColumn("ID", MySqlDbType.Int32) {Unique = true, Primary = true, AutoIncrement = true}, new SqlColumn("UserID", MySqlDbType.Int32) {Unique = true}, new SqlColumn("Time", MySqlDbType.Int32), new SqlColumn("PlayerKills", MySqlDbType.Int32), new SqlColumn("Deaths", MySqlDbType.Int32), new SqlColumn("MobKills", MySqlDbType.Int32), new SqlColumn("BossKills", MySqlDbType.Int32), new SqlColumn("Logins", MySqlDbType.Int32), new SqlColumn("MobDamageGiven", MySqlDbType.Int32), new SqlColumn("BossDamageGiven", MySqlDbType.Int32), new SqlColumn("PlayerDamageGiven", MySqlDbType.Int32), new SqlColumn("DamageReceived", MySqlDbType.Int32)); var table2 = new SqlTable("Highscores", new SqlColumn("ID", MySqlDbType.Int32) {Unique = true, Primary = true, AutoIncrement = true}, new SqlColumn("UserID", MySqlDbType.Int32) {Unique = true}, new SqlColumn("Score", MySqlDbType.Int32)); database.EnsureExists(table, table2); //database.Import(); }