|
| 1 | +import { MigrationInterface, QueryRunner } from 'typeorm'; |
| 2 | + |
| 3 | +export class Persona1777477090471 implements MigrationInterface { |
| 4 | + name = 'Persona1777477090471'; |
| 5 | + |
| 6 | + public async up(queryRunner: QueryRunner): Promise<void> { |
| 7 | + await queryRunner.query(/* sql */ ` |
| 8 | + CREATE TABLE "persona" ( |
| 9 | + "id" text NOT NULL, |
| 10 | + "title" text NOT NULL, |
| 11 | + "emoji" text NOT NULL, |
| 12 | + "tags" text array NOT NULL DEFAULT '{}', |
| 13 | + "sortOrder" integer NOT NULL DEFAULT 0, |
| 14 | + "createdAt" TIMESTAMP NOT NULL DEFAULT now(), |
| 15 | + "updatedAt" TIMESTAMP NOT NULL DEFAULT now(), |
| 16 | + CONSTRAINT "PK_persona_id" PRIMARY KEY ("id") |
| 17 | + ) |
| 18 | + `); |
| 19 | + |
| 20 | + await queryRunner.query( |
| 21 | + /* sql */ ` |
| 22 | + INSERT INTO "persona" ("id", "title", "emoji", "tags", "sortOrder") |
| 23 | + VALUES |
| 24 | + ($1, 'Frontend Developer', '🌐', |
| 25 | + ARRAY['webdev','javascript','react','css','typescript','html','nextjs','tailwind-css','vuejs','angular','frontend','ui-design']::text[], 1), |
| 26 | + ($2, 'Backend Developer', '⚙️', |
| 27 | + ARRAY['python','java','golang','database','architecture','microservices','rest-api','graphql','docker','postgresql','redis','kafka']::text[], 2), |
| 28 | + ($3, 'AI/ML Engineer', '🤖', |
| 29 | + ARRAY['ai','machine-learning','python','data-science','deep-learning','nlp','pytorch','genai','llm','computer-vision','neural-networks','ai-agents']::text[], 3), |
| 30 | + ($4, 'DevOps / Cloud', '☁️', |
| 31 | + ARRAY['devops','cloud','aws','docker','kubernetes','cicd','terraform','linux','containers','infrastructure','monitoring','serverless','github-actions']::text[], 4), |
| 32 | + ($5, 'Mobile Developer', '📱', |
| 33 | + ARRAY['mobile','react-native','swift','android','ios','flutter','kotlin','iphone','firebase','app-store']::text[], 5), |
| 34 | + ($6, 'Security / Cyber', '🔒', |
| 35 | + ARRAY['security','cyber','data-privacy','encryption','malware','phishing','ransomware','vulnerability','compliance','appsec','cryptography']::text[], 6), |
| 36 | + ($7, 'Game Developer', '🎮', |
| 37 | + ARRAY['gaming','game-development','unity','unreal-engine','game-design','3d','blender','c++','vr','c#']::text[], 7), |
| 38 | + ($8, 'Data Engineer', '📊', |
| 39 | + ARRAY['data-science','python','data-analysis','data-visualization','big-data','database','data-engineering','machine-learning','algorithms','math','pytorch']::text[], 8), |
| 40 | + ($9, 'Tech Lead / Startup', '🚀', |
| 41 | + ARRAY['startup','tech-news','leadership','architecture','open-source','career','agile','product-management','venture-capital','business','tools']::text[], 9), |
| 42 | + ($10, 'Systems Programmer', '🦀', |
| 43 | + ARRAY['rust','c','c++','linux','golang','performance','hardware','computing','webassembly','algorithms']::text[], 10) |
| 44 | + `, |
| 45 | + [ |
| 46 | + 'frontend', |
| 47 | + 'backend', |
| 48 | + 'ai-ml', |
| 49 | + 'devops', |
| 50 | + 'mobile', |
| 51 | + 'security', |
| 52 | + 'gamedev', |
| 53 | + 'data', |
| 54 | + 'lead', |
| 55 | + 'systems', |
| 56 | + ], |
| 57 | + ); |
| 58 | + } |
| 59 | + |
| 60 | + public async down(queryRunner: QueryRunner): Promise<void> { |
| 61 | + await queryRunner.query(`DROP TABLE "persona"`); |
| 62 | + } |
| 63 | +} |
0 commit comments