-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmigrate-curated.js
More file actions
122 lines (117 loc) · 7.51 KB
/
migrate-curated.js
File metadata and controls
122 lines (117 loc) · 7.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
const { PrismaClient } = require('@prisma/client');
const prisma = new PrismaClient();
const CURATED_REFI_PROJECTS = [
{
id: "gc1",
name: "GoodDollar UBI+ for Women – Colombia",
tagline: "Bridging the financial exclusion gap for Colombian women by providing a sustainable, daily GoodDollar basic income to fuel community growth and personal economic autonomy.",
category: "SOCIAL_IMPACT",
logo: "/donate-images/happy.png",
fundingGoal: 1000,
featured: true,
slug: "gooddollar-women-colombia",
website: "https://gooddapp.org/",
location: "Colombia",
walletAddress: "0x0d43131f1577310D6349bAF9D6Da4fC1Cd39764C",
description: "Women represent the majority of unpaid labor worldwide caregiving, household management, community organizing yet this work remains largely invisible to traditional economic systems. Despite being central to the functioning of families and societies, women continue to face systemic barriers to capital, representation, and opportunity: wage gaps, limited access to credit, underrepresentation in financial and political institutions, and disproportionate vulnerability to economic shocks.\n\nThis pool provides additional daily G$ to women in columiba through a segmented basic income model a framework that directs resources to those who have historically been underserved by traditional financial systems."
},
{
id: "gc2",
name: "Silvi - Kenya's Kakamega forest",
tagline: "Restoring the vital canopy of Kenya's last tropical rainforest through direct micro-grants to smallholder farmers implementing sustainable agroforestry and native restoration.",
category: "CLIMATE",
logo: "/donate-images/grass.jpg",
fundingGoal: 1000,
featured: true,
slug: "silvi-kakamega-forest",
website: "https://gooddapp.org/",
location: "Kenya",
walletAddress: "0xC1dCdf8E70acB44CDbB688C91A4883Cf9052Ea9c",
description: "Kenya's Kakamega forest is one of the last remnants of the great tropical rainforest that once spanned the African continent. The forest is home to an incredible diversity of plant and animal species, many of which are found nowhere else on Earth.\n\nThis Collective directly supports smallholder farmers around Kenya's Kakamega forest through sustainable agroforestry practices, providing daily G$ distributions to those working on reforestation and conservation efforts."
},
{
id: "gc3",
name: "GoodDollar UBI+ for Women – Nigeria",
tagline: "Empowering female entrepreneurs across Nigeria with direct blockchain-based basic income to foster localized mutual-aid networks and drive grassroots financial independence.",
category: "SOCIAL_IMPACT",
logo: "/donate-images/laugh.png",
fundingGoal: 1000,
featured: false,
slug: "gooddollar-women-nigeria",
website: "https://gooddapp.org/",
location: "Nigeria",
walletAddress: "0xDd1c12f197E6D1E2FBA15487AaAE500eF6e07BCA",
description: "Nigeria stands as one of Africa’s leading economic powerhouses, yet a significant gap remains in financial inclusion for women. By expanding access to modern banking, credit, and sustainable economic pathways, we empower Nigerian women to achieve financial independence and drive transformative growth within their communities.\n\nThis pool provides additional daily G$ to women in Nigeria through a segmented basic income model, empowering them with digital assets that can be used for daily needs, savings, and micro-enterprise development."
},
{
id: "gc4",
name: "Pesia's Kitchen EAT Initiative",
tagline: "Combating food insecurity and urban waste by rescuing surplus nutritional resources from local markets and redistributing them directly to the most vulnerable families.",
category: "SOCIAL_IMPACT",
logo: "/donate-images/cooking.jpg",
fundingGoal: 1000,
featured: false,
slug: "pesias-kitchen-eat",
website: "https://gooddapp.org/",
location: "Global",
walletAddress: "0xE4f65e8644C0f3a1C7ef0BA0F1428A82cDc0E7Bc",
description: "Pesia's Kitchen EAT Initiative is a community-powered food rescue initiative committed to reducing waste and ensuring food security for underserved populations. Working at the intersection of sustainability and social impact, the initiative rescues surplus food from local markets and restaurants.\n\nThrough partnerships with community organizations, the recovered food is redistributed to families and individuals in need, ensuring that nutritious meals reach those who need them most."
},
{
id: "gc5",
name: "Global Classrooms Environmental Education",
tagline: "Connecting students across the globe to collaborate on environmental restoration and climate solutions through a transparent, gamified digital learning curriculum.",
category: "EDUCATION",
logo: "/donate-images/cartoon.jpg",
fundingGoal: 1000,
featured: false,
slug: "global-classrooms-education",
website: "https://gooddapp.org/",
location: "Global",
walletAddress: "0xf3d629a2c198fC91d7D3F18217684166C83C7312",
description: "Global Classrooms connects students worldwide to collaborate on environmental projects aligned with UN Sustainable Development Goals. Through digital platforms and in-person exchanges, students learn about climate change, biodiversity loss, and sustainable development.\n\nThe program provides resources, mentorship, and funding for student-led environmental projects, fostering a new generation of environmentally conscious leaders who can drive meaningful change in their communities."
},
{
id: "g2",
name: "Green Pill Nigeria",
tagline: "Decentralizing impact through Regenerative Finance (ReFi) tools, empowering local Nigerian builders to create high-impact, transparent public goods for their own communities.",
category: "SOCIAL_IMPACT",
logo: "/assets/greenpill-nigeria.jfif",
fundingGoal: 200,
featured: true,
slug: "greenpill-nigeria",
website: "https://greenpill.network",
location: "Nigeria",
walletAddress: "0xDd1c12f197E6D1E2FBA15487AaAE500eF6e07BCA",
description: "Greenpill Nigeria is a community-driven initiative focused on decentralizing impact through Regenerative Finance (ReFi) tools. We empower local builders and communities to create sustainable public goods using blockchain technology, fostering transparency and localized growth across the region."
}
];
async function main() {
console.log("Starting migration of curated projects to database...");
for (const project of CURATED_REFI_PROJECTS) {
try {
console.log(`Migrating: ${project.name}`);
await prisma.project.upsert({
where: { slug: project.slug },
update: {
...project,
status: 'APPROVED',
updatedAt: new Date()
},
create: {
...project,
status: 'APPROVED'
}
});
console.log(`Successfully migrated: ${project.name}`);
} catch (err) {
console.error(`Error migrating ${project.name}:`, err.message);
}
}
console.log("Migration finished.");
}
main()
.catch(e => console.error(e))
.finally(async () => {
await prisma.$disconnect();
});