This repository has been archived on 2024-07-18. You can view files and clone it, but cannot push or open issues or pull requests.
lwb5/sql/20-credits.sql

19 lines
537 B
MySQL
Raw Permalink Normal View History

2016-01-10 11:01:49 +01:00
-- LegacyWorlds Beta 5
-- PostgreSQL database scripts
--
-- 20-credits.sql
--
-- Initialises the tables that store credits
--
-- Copyright(C) 2004-2007, DeepClone Development
-- --------------------------------------------------------
CREATE TABLE main.credits (
account BIGINT NOT NULL PRIMARY KEY REFERENCES main.account (id) ON DELETE CASCADE,
resources_used INT NOT NULL DEFAULT 0 CHECK(resources_used >= 0),
credits_obtained INT NOT NULL DEFAULT 9000
);
GRANT SELECT,INSERT,UPDATE ON TABLE main.credits TO legacyworlds;