Testserver with shared database: Difference between revisions

Content deleted Content added
imported>Hendrik Brummermann
update script
imported>Kymara
m extra word removed
 
(34 intermediate revisions by 2 users not shown)
Line 1:
{{Navigation for Marauroa Top|Using}}
{{Navigation for Marauroa Users}}
 
This article describes how to configure a test server so that players can use their normal accounts and characters for testing.
 
Line 11 ⟶ 14:
The complex way allows players to test with their own account and characters, while doing smart things with the logs. The login events will be logged to the original database so that the number of wrong password tries sums up both databases. The Stendhal website displays a login history covering all sources: website, main server and test server. The gameEvents and itemlog tables will be kept for the analysis of bugs.
 
=== SetupConfigure marauroa on test databaseserver ===
 
Configure the test server just like a normal server with its own database.
{{TODO|describe database setup}}
 
Then you need to disable account and character creations. It is essential that those are only created on the main server in order to ensure a consistent database. And you may want to add a big hint, telling players that this is a test server:
=== Configure marauroa on test server ===
 
allow_account_creation=false
{{TODO|describe marauroa setup}}
allow_character_creation=false
server_welcome=Please note: The test database will be reset every day and all PROGRESS WILL BE LOST.
 
=== Setup test database ===
 
Please start the test server once, so that it will create all the tables, do not login.
 
We are going to replace some tables with VIEWs pointing to the main database:
 
<source lang="sql">
DROP TABLE account;
DROP TABLE accountban;
DROP TABLE banlist;
DROP TABLE characters;
DROP TABLE loginEvent;
CREATE VIEW account AS SELECT * FROM marauroa.account;
CREATE VIEW accountban AS SELECT * FROM marauroa.accountban;
CREATE VIEW banlist AS SELECT * FROM marauroa.banlist;
CREATE VIEW characters AS SELECT * FROM marauroa.characters;
CREATE VIEW loginEvent AS SELECT * FROM marauroa.loginEvent;
</source>
 
=== Nightly update script ===
Line 34 ⟶ 57:
TRUNCATE rpobject;
</source>
 
[[Category:Marauroa]]
{{#breadcrumbs: [[Marauroa]] | [[Navigation for Marauroa Users|Using]] | [[Testserver with shared database|Testserver]]}}