Slide 511
Slide 511 text
SELECT
col_type_is(
'users',
'nickname',
'text'
);
SELECT
col_hasnt_default(
'users',
'nickname'
);
SELECT
col_is_pk(
'users',
'nickname'
);
SET
search_path
=
public,tap;
!
BEGIN;
SELECT
no_plan();
-‐-‐
SELECT
plan(1);
!
SELECT
has_table(
'users'
);
SELECT
has_column(
'users',
'timestamp'
);
test/users.sql
SELECT
has_column(
'users',
'nickname'
);
SELECT
has_column(
'users',
'password'
);
SELECT
has_pk(
'users'
);
SELECT
col_type_is('users',
'timestamp',
'timestamp
with
time
zone');
SELECT
col_not_null(
'users',
'timestamp'
);
SELECT
col_has_default(
'users',
'timestamp'
);
SELECT
col_default_is(
'users',
'timestamp',
'now()'
);
SELECT
col_type_is(
'users',
'password',
'text'
);
SELECT
col_not_null(
'users',
'password'
);
SELECT
col_hasnt_default(
'users',
'password'
);
SELECT
finish();
ROLLBACK;