Skip to content

Commit 5df0fd1

Browse files
chore: wip
1 parent fa1fa4a commit 5df0fd1

File tree

80 files changed

+661
-915
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+661
-915
lines changed

app/Models/User.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default {
4040
},
4141

4242
hasOne: ['Subscriber'],
43-
hasMany: ['Deployment', 'Subscription', 'PaymentMethod', 'Post', 'PaymentTransaction'],
43+
hasMany: ['Deployment', 'Subscription', 'PaymentMethod', 'Post', 'PaymentTransaction', 'Customer'],
4444

4545
belongsToMany: ['Team'],
4646

database/migrations/1742310442418-create-personal_access_tokens-table.ts renamed to database/migrations/1742377001075-create-personal_access_tokens-table.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ export async function up(db: Database<any>) {
1515
.addColumn('ip_address', 'text')
1616
.addColumn('device_name', 'text')
1717
.addColumn('is_single_use', 'integer')
18-
.addColumn('team_id', 'integer', (col) =>
19-
col.references('teams.id').onDelete('cascade')
20-
)
18+
.addColumn('team_id', 'integer', col =>
19+
col.references('teams.id').onDelete('cascade'))
2120
.addColumn('created_at', 'timestamp', col => col.notNull().defaultTo(sql`CURRENT_TIMESTAMP`))
2221
.addColumn('updated_at', 'timestamp')
2322
.execute()
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import type { Database } from '@stacksjs/database'
2+
23
export async function up(db: Database<any>) {
34
await db.schema
45
.createTable('team_users')
56
.addColumn('id', 'integer', col => col.primaryKey().autoIncrement())
67
.addColumn('team_id', 'integer')
78
.addColumn('user_id', 'integer')
89
.execute()
9-
}
10+
}

database/migrations/1742310442445-create-subscribers-table.ts renamed to database/migrations/1742377001102-create-subscribers-table.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ export async function up(db: Database<any>) {
66
.createTable('subscribers')
77
.addColumn('id', 'integer', col => col.primaryKey().autoIncrement())
88
.addColumn('subscribed', 'integer', col => col.notNull())
9-
.addColumn('user_id', 'integer', (col) =>
10-
col.references('users.id').onDelete('cascade')
11-
)
9+
.addColumn('user_id', 'integer', col =>
10+
col.references('users.id').onDelete('cascade'))
1211
.addColumn('created_at', 'timestamp', col => col.notNull().defaultTo(sql`CURRENT_TIMESTAMP`))
1312
.addColumn('updated_at', 'timestamp')
1413
.execute()

database/migrations/1742310442457-create-deployments-table.ts renamed to database/migrations/1742377001115-create-deployments-table.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ export async function up(db: Database<any>) {
1313
.addColumn('execution_time', 'numeric', col => col.notNull())
1414
.addColumn('deploy_script', 'text', col => col.notNull())
1515
.addColumn('terminal_output', 'text', col => col.notNull())
16-
.addColumn('user_id', 'integer', (col) =>
17-
col.references('users.id').onDelete('cascade')
18-
)
16+
.addColumn('user_id', 'integer', col =>
17+
col.references('users.id').onDelete('cascade'))
1918
.addColumn('created_at', 'timestamp', col => col.notNull().defaultTo(sql`CURRENT_TIMESTAMP`))
2019
.addColumn('updated_at', 'timestamp')
2120
.execute()

database/migrations/1742310442480-create-passkeys-table.ts renamed to database/migrations/1742377001139-create-passkeys-table.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { Database } from '@stacksjs/database'
2-
import { sql } from '@stacksjs/database'
2+
import { sql } from '@stacksjs/database'
33

44
export async function up(db: Database<any>) {
55
await db.schema
@@ -17,4 +17,4 @@ export async function up(db: Database<any>) {
1717
.addColumn('last_used_at', 'text')
1818
.addColumn('created_at', 'timestamp', col => col.notNull().defaultTo(sql.raw('CURRENT_TIMESTAMP')))
1919
.execute()
20-
}
20+
}

0 commit comments

Comments
 (0)