Added authorized overdraft. Closes #6.
This commit is contained in:
@ -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
|
||||
--
|
||||
|
2
src/sql/update/0.1-0.2/001_authorized_overdraft.sql
Normal file
2
src/sql/update/0.1-0.2/001_authorized_overdraft.sql
Normal file
@ -0,0 +1,2 @@
|
||||
ALTER TABLE account ADD COLUMN authorized_overdraft INTEGER NOT NULL DEFAULT 0;
|
||||
|
Reference in New Issue
Block a user