feat(licenses): add migration and truncation scripts for database management

- Introduced migration script to handle database schema updates using Drizzle ORM.
- Added truncation script to clear the database schema and reset the state.
- Updated package.json scripts for easier execution of migration and truncation tasks.
- Refactored email and Stripe integration for better modularity and maintainability.
This commit is contained in:
Mauricio Siu
2025-03-19 00:57:14 -06:00
parent 523720606d
commit 473d729416
9 changed files with 91 additions and 179 deletions

View File

@@ -20,7 +20,7 @@ export const createLicense = async ({
billingType: "monthly" | "annual";
email: string;
}) => {
const licenseKey = generateLicenseKey();
const licenseKey = `dokploy-${generateLicenseKey()}`;
const expiresAt = new Date();
expiresAt.setMonth(
expiresAt.getMonth() + (billingType === "annual" ? 12 : 1),