Skip to content

Commit 0b8f4a1

Browse files
chore: wip
1 parent da81418 commit 0b8f4a1

20 files changed

+106
-34
lines changed

app/Models/User.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export default {
4444
attributes: {
4545
name: {
4646
required: true,
47+
order: 5,
4748
validation: {
4849
rule: schema.string().minLength(3).maxLength(255),
4950
message: {
@@ -58,6 +59,7 @@ export default {
5859
email: {
5960
unique: true,
6061
required: true,
62+
order: 1,
6163
validation: {
6264
rule: schema.string().email(),
6365
message: {
@@ -70,6 +72,7 @@ export default {
7072

7173
jobTitle: {
7274
required: true,
75+
order: 3,
7376
validation: {
7477
rule: schema.string().minLength(3).maxLength(255),
7578
message: {
@@ -82,6 +85,7 @@ export default {
8285
},
8386
content: {
8487
required: true,
88+
order: 4,
8589
validation: {
8690
rule: schema.string().minLength(3).maxLength(255),
8791
message: {
@@ -95,6 +99,7 @@ export default {
9599

96100
password: {
97101
required: true,
102+
order: 2,
98103
validation: {
99104
rule: schema.string().minLength(6).maxLength(255),
100105
message: {

database/migrations/1719034142366-update-users-table.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

database/migrations/1719034136692-create-users-table.ts renamed to database/migrations/1719235283530-create-users-table.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export async function up(db: Database<any>) {
88
.addColumn('name', 'varchar(255)', col => col.notNull())
99
.addColumn('email', 'varchar(255)', col => col.unique().notNull())
1010
.addColumn('job_title', 'varchar(255)', col => col.notNull())
11+
.addColumn('content', 'varchar(255)', col => col.notNull())
1112
.addColumn('password', 'varchar(255)', col => col.notNull())
1213
.addColumn('created_at', 'timestamp', col => col.notNull().defaultTo(sql.raw('CURRENT_TIMESTAMP')))
1314
.addColumn('updated_at', 'timestamp')

0 commit comments

Comments
 (0)