github.com/mssola/todo@v0.0.0-20181029153210-d25348dc3f48/db/tables.sql (about)

     1  -- Copyright (C) 2014-2017 Miquel Sabaté Solà
     2  -- This file is licensed under the MIT license.
     3  -- See the LICENSE file.
     4  
     5  
     6  create table if not exists users (
     7      id uuid primary key,
     8      name varchar(255) unique not null check (name <> ''),
     9      password_hash text,
    10      created_at timestamp default current_timestamp
    11  );
    12  
    13  create table if not exists topics (
    14      id uuid primary key,
    15      name varchar(255) unique not null check (name <> ''),
    16      contents text default ''::text,
    17      created_at timestamp default current_timestamp
    18  );
    19