Skip to content

Instantly share code, notes, and snippets.

@Samuyi
Created January 8, 2019 16:39
Show Gist options
  • Select an option

  • Save Samuyi/fe05a7cdf825ba7d4d2a4e9c6d8abfe6 to your computer and use it in GitHub Desktop.

Select an option

Save Samuyi/fe05a7cdf825ba7d4d2a4e9c6d8abfe6 to your computer and use it in GitHub Desktop.

Revisions

  1. Samuyi created this gist Jan 8, 2019.
    17 changes: 17 additions & 0 deletions account_table.sql
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    CREATE TABLE account (
    id serial primary key,
    name text,
    debt int,
    balance int
    );

    CREATE TABLE account_audit(
    id serial primary key,
    db_user text NOT NULL default session_user,
    operation text,
    account_id int,
    account_name text,
    debt int,
    balance int,
    created_at timestamp with time zone default current_timestamp
    );