xiongzhu %!s(int64=2) %!d(string=hai) anos
pai
achega
5acdd9a5f0
Modificáronse 4 ficheiros con 14 adicións e 13 borrados
  1. 5 5
      .env
  2. 4 4
      .env.production
  3. 2 1
      src/app.module.ts
  4. 3 3
      src/users/entities/users.entity.ts

+ 5 - 5
.env

@@ -26,11 +26,11 @@ THROTTLE_TTL=60
 THROTTLE_LIMIT=20
 
 TYPEORM_CONNECTION="mysql"
-TYPEORM_HOST="rm-wz9sc79f5255780opqo.mysql.rds.aliyuncs.com"
+TYPEORM_HOST="rdsave1o67m1ido6gwp6public.mysql.rds.aliyuncs.com"
 TYPEORM_PORT=3306
-TYPEORM_USERNAME=chillgpt
-TYPEORM_PASSWORD="zM^jnvPbSKNY4%zj#3"
-TYPEORM_DATABASE=chillgpt_test
+TYPEORM_USERNAME=gpt
+TYPEORM_PASSWORD="qkzBs&R84!*MP%qN"
+TYPEORM_DATABASE=gpt_test
 TYPEORM_AUTO_SCHEMA_SYNC=true
 TYPEORM_ENTITIES="dist/**/*.entity.js"
 TYPEORM_SUBSCRIBERS="dist/subscriber/**/*.js"
@@ -64,4 +64,4 @@ WX_MCH_CERT_SERIAL=7E16A0B9C5BD87038BFF7FD2E0D6653CF45F168F
 WX_MCH_CERT_PATH=src/cert/
 WX_NOTIFY_URL=https://gpt.izouma.com/api/notify/weixin
 
-REDIS_URI=redis://:4dSM4yvhbS6@8@oE@120.78.133.82:6379/1
+REDIS_URI=redis://:4dSM4yvhbS6@8@oE@47.97.42.229:6379/1

+ 4 - 4
.env.production

@@ -26,11 +26,11 @@ THROTTLE_TTL=60
 THROTTLE_LIMIT=20
 
 TYPEORM_CONNECTION="mysql"
-TYPEORM_HOST="rm-wz9sc79f5255780op.mysql.rds.aliyuncs.com"
+TYPEORM_HOST="rdsave1o67m1ido6gwp6145.mysql.rds.aliyuncs.com"
 TYPEORM_PORT=3306
-TYPEORM_USERNAME=chillgpt
-TYPEORM_PASSWORD="zM^jnvPbSKNY4%zj#3"
-TYPEORM_DATABASE=chillgpt
+TYPEORM_USERNAME=gpt
+TYPEORM_PASSWORD="qkzBs&R84!*MP%qN"
+TYPEORM_DATABASE=gpt
 TYPEORM_AUTO_SCHEMA_SYNC=true
 TYPEORM_ENTITIES="dist/**/*.entity.js"
 TYPEORM_SUBSCRIBERS="dist/subscriber/**/*.js"

+ 2 - 1
src/app.module.ts

@@ -60,7 +60,8 @@ import { AllExceptionsFilter } from './filters/all-exceptions-filter.filter'
                 cli: {
                     migrationsDir: config.get<string>('TYPEORM_MIGRATIONS_DIR'),
                     subscribersDir: config.get<string>('TYPEORM_SUBSCRIBERS_DIR')
-                }
+                },
+                logging: true
             })
         }),
         AliyunModule,

+ 3 - 3
src/users/entities/users.entity.ts

@@ -10,20 +10,20 @@ export class Users {
     @Column()
     name: string
 
-    @Column({ unique: true })
+    @Column({ length: 100, unique: true })
     username: string
 
     @Column({ nullable: true })
     avatar?: string
 
-    @Column({ unique: true, nullable: true })
+    @Column({ length: 100, unique: true, nullable: true })
     email?: string
 
     @Column({ nullable: true })
     @Exclude({ toPlainOnly: true })
     password?: string
 
-    @Column({ nullable: true, unique: true })
+    @Column({ length: 30, nullable: true, unique: true })
     phone?: string
 
     @Column({ type: 'set', enum: Role, default: Role.User })