migrate auth v2 code
This commit is contained in:
+5
-28
@@ -103,7 +103,6 @@ export const SCHEMA_PLAN: CollectionPlanEntry[] = [
|
||||
[
|
||||
text("name", true),
|
||||
uniqueText("slug"),
|
||||
text("inviteCode"),
|
||||
text("stripeCustomerId"),
|
||||
jsonField("featureFlags"),
|
||||
jsonField("seasons"),
|
||||
@@ -132,17 +131,6 @@ export const SCHEMA_PLAN: CollectionPlanEntry[] = [
|
||||
build: (ids) =>
|
||||
col("settings", [rel("famId", ids.fams, true), text("webhookUrl")])(ids),
|
||||
},
|
||||
{
|
||||
name: "members",
|
||||
build: (ids) =>
|
||||
col("members", [
|
||||
rel("famId", ids.fams, true),
|
||||
text("name", true),
|
||||
text("color"),
|
||||
text("deviceToken"),
|
||||
text("deviceTokenHint"),
|
||||
])(ids),
|
||||
},
|
||||
{
|
||||
name: "chore_templates",
|
||||
build: (ids) =>
|
||||
@@ -155,17 +143,6 @@ export const SCHEMA_PLAN: CollectionPlanEntry[] = [
|
||||
number("defaultValue", true),
|
||||
])(ids),
|
||||
},
|
||||
{
|
||||
name: "fam_admins",
|
||||
build: (ids) =>
|
||||
col("fam_admins", [
|
||||
rel("famId", ids.fams, true),
|
||||
text("userId", true),
|
||||
text("email", true),
|
||||
text("name"),
|
||||
text("color"),
|
||||
])(ids),
|
||||
},
|
||||
{
|
||||
name: "bonus_configs",
|
||||
build: (ids) =>
|
||||
@@ -179,7 +156,7 @@ export const SCHEMA_PLAN: CollectionPlanEntry[] = [
|
||||
select("rewardType", ["points", "cash", "prize"], true),
|
||||
text("rewardValue", true),
|
||||
number("criteriaValue"),
|
||||
rel("memberId", ids.members),
|
||||
rel("memberId", ids.users),
|
||||
select("period", ["schedule", "daily", "weekly", "monthly"]),
|
||||
select("status", ["active", "completed"], true),
|
||||
])(ids),
|
||||
@@ -189,7 +166,7 @@ export const SCHEMA_PLAN: CollectionPlanEntry[] = [
|
||||
build: (ids) =>
|
||||
col("weekly_history", [
|
||||
rel("famId", ids.fams, true),
|
||||
rel("memberId", ids.members, true),
|
||||
rel("memberId", ids.users, true),
|
||||
date("weekStart"),
|
||||
number("pointsEarned"),
|
||||
number("moneyEarned"),
|
||||
@@ -241,7 +218,7 @@ export const SCHEMA_PLAN: CollectionPlanEntry[] = [
|
||||
build: (ids) =>
|
||||
col("rewards", [
|
||||
rel("famId", ids.fams, true),
|
||||
rel("memberId", ids.members, true),
|
||||
rel("memberId", ids.users, true),
|
||||
rel("bonusConfigId", ids.bonus_configs),
|
||||
text("label", true),
|
||||
number("value", true),
|
||||
@@ -259,7 +236,7 @@ export const SCHEMA_PLAN: CollectionPlanEntry[] = [
|
||||
build: (ids) =>
|
||||
col("assigned_chores", [
|
||||
rel("famId", ids.fams, true),
|
||||
rel("memberId", ids.members, true),
|
||||
rel("memberId", ids.users, true),
|
||||
rel("templateId", ids.chore_templates, true),
|
||||
select("frequency", ["daily", "weekly"], true),
|
||||
select("type", ["points", "money"], true),
|
||||
@@ -273,7 +250,7 @@ export const SCHEMA_PLAN: CollectionPlanEntry[] = [
|
||||
build: (ids) =>
|
||||
col("completions", [
|
||||
rel("famId", ids.fams, true),
|
||||
rel("memberId", ids.members, true),
|
||||
rel("memberId", ids.users, true),
|
||||
rel("assignedChoreId", ids.assigned_chores, true),
|
||||
date("date"),
|
||||
date("completedAt"),
|
||||
|
||||
Reference in New Issue
Block a user