mirror of
				https://github.com/i701/sarlink-portal.git
				synced 2025-11-04 12:36:59 +00:00 
			
		
		
		
	first commit
This commit is contained in:
		
							
								
								
									
										25
									
								
								prisma/migrations/20241124133512_add/migration.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								prisma/migrations/20241124133512_add/migration.sql
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
			
		||||
-- RedefineTables
 | 
			
		||||
PRAGMA defer_foreign_keys=ON;
 | 
			
		||||
PRAGMA foreign_keys=OFF;
 | 
			
		||||
CREATE TABLE "new_user" (
 | 
			
		||||
    "id" TEXT NOT NULL PRIMARY KEY,
 | 
			
		||||
    "name" TEXT,
 | 
			
		||||
    "email" TEXT NOT NULL,
 | 
			
		||||
    "emailVerified" BOOLEAN NOT NULL DEFAULT false,
 | 
			
		||||
    "firstPaymentDone" BOOLEAN NOT NULL DEFAULT false,
 | 
			
		||||
    "verified" BOOLEAN NOT NULL DEFAULT false,
 | 
			
		||||
    "image" TEXT,
 | 
			
		||||
    "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
 | 
			
		||||
    "updatedAt" DATETIME NOT NULL,
 | 
			
		||||
    "phoneNumber" TEXT NOT NULL,
 | 
			
		||||
    "phoneNumberVerified" BOOLEAN NOT NULL DEFAULT false,
 | 
			
		||||
    "role" TEXT,
 | 
			
		||||
    "lang" TEXT
 | 
			
		||||
);
 | 
			
		||||
INSERT INTO "new_user" ("createdAt", "email", "emailVerified", "firstPaymentDone", "id", "image", "lang", "name", "phoneNumber", "phoneNumberVerified", "role", "updatedAt") SELECT "createdAt", "email", "emailVerified", "firstPaymentDone", "id", "image", "lang", "name", "phoneNumber", "phoneNumberVerified", "role", "updatedAt" FROM "user";
 | 
			
		||||
DROP TABLE "user";
 | 
			
		||||
ALTER TABLE "new_user" RENAME TO "user";
 | 
			
		||||
CREATE UNIQUE INDEX "user_email_key" ON "user"("email");
 | 
			
		||||
CREATE UNIQUE INDEX "user_phoneNumber_key" ON "user"("phoneNumber");
 | 
			
		||||
PRAGMA foreign_keys=ON;
 | 
			
		||||
PRAGMA defer_foreign_keys=OFF;
 | 
			
		||||
		Reference in New Issue
	
	Block a user