Added authorized overdraft. Closes #6.

This commit is contained in:
Alexis Lahouze
2013-01-24 20:44:09 +01:00
parent a576a36d3d
commit 9e0a5a2ea1
6 changed files with 79 additions and 31 deletions

View File

@ -8,6 +8,20 @@ SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
--
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -
--
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
SET search_path = public, pg_catalog;
SET default_tablespace = '';
@ -20,7 +34,8 @@ SET default_with_oids = false;
CREATE TABLE account (
id integer NOT NULL,
name character varying(200) NOT NULL
name character varying(200) NOT NULL,
authorized_overdraft integer DEFAULT 0 NOT NULL
);
@ -130,6 +145,16 @@ ALTER TABLE ONLY entry
ADD CONSTRAINT entry_account_id_fkey FOREIGN KEY (account_id) REFERENCES account(id);
--
-- Name: public; Type: ACL; Schema: -; Owner: -
--
REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;
--
-- PostgreSQL database dump complete
--

View File

@ -0,0 +1,2 @@
ALTER TABLE account ADD COLUMN authorized_overdraft INTEGER NOT NULL DEFAULT 0;