@oktis-works/database 0.3.7 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/schema/schema.sql +4 -0
- package/package.json +3 -3
package/dist/schema/schema.sql
CHANGED
|
@@ -30,11 +30,15 @@ CREATE TABLE IF NOT EXISTS users (
|
|
|
30
30
|
password_hash VARCHAR(511) NOT NULL,
|
|
31
31
|
avatar VARCHAR(511),
|
|
32
32
|
status VARCHAR(20) NOT NULL DEFAULT 'ACTIVE' CHECK (status IN ('ACTIVE', 'INACTIVE', 'LOCKED')),
|
|
33
|
+
locale VARCHAR(10),
|
|
33
34
|
last_login_at TIMESTAMP WITH TIME ZONE,
|
|
34
35
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
|
|
35
36
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
|
|
36
37
|
);
|
|
37
38
|
|
|
39
|
+
-- Idempotente para bancos criados antes do i18n do admin (V005).
|
|
40
|
+
ALTER TABLE users ADD COLUMN IF NOT EXISTS locale VARCHAR(10);
|
|
41
|
+
|
|
38
42
|
CREATE INDEX IF NOT EXISTS idx_users_email ON users(email);
|
|
39
43
|
CREATE INDEX IF NOT EXISTS idx_users_status ON users(status);
|
|
40
44
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oktis-works/database",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"db:rollback": "node --loader ts-node/esm src/migrations/runner.ts rollback"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@oktis-works/types": "^0.
|
|
23
|
-
"@oktis-works/config": "^0.
|
|
22
|
+
"@oktis-works/types": "^0.4.0",
|
|
23
|
+
"@oktis-works/config": "^0.4.0",
|
|
24
24
|
"postgres": "3.4.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|