Skip to content

Commit c40e6c9

Browse files
committed
feat: move extensions into migrations
1 parent cc67b65 commit c40e6c9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

apps/database/migrations/committed/000002-users-and-auth.sql

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--! Previous: sha1:de60470eae2711674026eea0ced5e4917011e6ea
2-
--! Hash: sha1:9dea4fdd69d1299eefc0f9295f1ceea5face488e
2+
--! Hash: sha1:59b313c6c36382410785d19241393e8110c9b9af
33
--! Message: users-and-auth
44

55
--! split: 0001-jwt-token-type.sql
@@ -21,6 +21,8 @@ $$ LANGUAGE sql STABLE;
2121
COMMENT ON FUNCTION app_public.viewer_id() IS 'Gets the id of the viewer who was identified by our JWT.';
2222

2323
--! split: 0010-user-table.sql
24+
CREATE EXTENSION IF NOT EXISTS citext WITH SCHEMA public;
25+
2426
DROP TABLE IF EXISTS app_public.user CASCADE;
2527
CREATE TABLE app_public.user
2628
(
@@ -183,6 +185,8 @@ CREATE TRIGGER _100_timestamps
183185
EXECUTE PROCEDURE app_private.tg__timestamps();
184186

185187
--! split: 0060-authenticate-user.sql
188+
CREATE EXTENSION IF NOT EXISTS pgcrypto WITH SCHEMA public;
189+
186190
CREATE FUNCTION app_public.authenticate(username citext,
187191
password text) RETURNS app_public.jwt_token AS
188192
$$

0 commit comments

Comments
 (0)