mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat(licenses): update database schema and enhance license management
- Refactored migration script to import schema from the correct path. - Updated package.json scripts for improved execution of migration and truncation tasks. - Added new SQL file to define license-related types and table structure. - Enhanced license management with new fields for Stripe customer and subscription IDs. - Implemented license deactivation logic and improved error handling in license validation. - Introduced health check endpoint for database connectivity verification.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"id": "41745f43-6627-49f6-afa3-ab192559b5a7",
|
||||
"id": "5a996744-b11f-4f1a-b4b0-91f6bf5c2bed",
|
||||
"prevId": "00000000-0000-0000-0000-000000000000",
|
||||
"version": "7",
|
||||
"dialect": "postgresql",
|
||||
@@ -15,12 +15,6 @@
|
||||
"notNull": true,
|
||||
"default": "gen_random_uuid()"
|
||||
},
|
||||
"customer_id": {
|
||||
"name": "customer_id",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"product_id": {
|
||||
"name": "product_id",
|
||||
"type": "text",
|
||||
@@ -79,6 +73,18 @@
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"stripeCustomerId": {
|
||||
"name": "stripeCustomerId",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"stripeSubscriptionId": {
|
||||
"name": "stripeSubscriptionId",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": true
|
||||
},
|
||||
"created_at": {
|
||||
"name": "created_at",
|
||||
"type": "timestamp",
|
||||
@@ -138,7 +144,8 @@
|
||||
"values": [
|
||||
"active",
|
||||
"expired",
|
||||
"cancelled"
|
||||
"cancelled",
|
||||
"payment_pending"
|
||||
]
|
||||
},
|
||||
"public.license_type": {
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
{
|
||||
"idx": 0,
|
||||
"version": "7",
|
||||
"when": 1742364501431,
|
||||
"tag": "0000_furry_nico_minoru",
|
||||
"when": 1742369437742,
|
||||
"tag": "0000_noisy_epoch",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user