feature #4: create procedure for user
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
-- Users
|
||||
create extension if not exists pgcrypto;
|
||||
-- select *
|
||||
-- from "user"
|
||||
-- where username = lower('nick@example.com')
|
||||
-- and password = crypt('12346', password);
|
||||
|
||||
create table "user"
|
||||
(
|
||||
|
||||
2
resources/sql/migrations/0000-init_view.down.sql
Normal file
2
resources/sql/migrations/0000-init_view.down.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- User
|
||||
drop view if exists user_lite;
|
||||
5
resources/sql/migrations/0000-init_view.up.sql
Normal file
5
resources/sql/migrations/0000-init_view.up.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- User
|
||||
create or replace view user_lite as
|
||||
select u.id, u.created_at, u.blocked_at, u.username
|
||||
from "user" u
|
||||
where u.blocked_at is null;
|
||||
Reference in New Issue
Block a user