@zodic/shared 0.0.24 → 0.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/db/migrations/0008_ancient_doomsday.sql +15 -0
- package/db/migrations/0009_odd_metal_master.sql +33 -0
- package/db/migrations/meta/0008_snapshot.json +1590 -0
- package/db/migrations/meta/0009_snapshot.json +1590 -0
- package/db/migrations/meta/_journal.json +14 -0
- package/db/schema.ts +34 -14
- package/package.json +2 -2
|
@@ -57,6 +57,20 @@
|
|
|
57
57
|
"when": 1737664103218,
|
|
58
58
|
"tag": "0007_complex_tarantula",
|
|
59
59
|
"breakpoints": true
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"idx": 8,
|
|
63
|
+
"version": "6",
|
|
64
|
+
"when": 1737668018656,
|
|
65
|
+
"tag": "0008_ancient_doomsday",
|
|
66
|
+
"breakpoints": true
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"idx": 9,
|
|
70
|
+
"version": "6",
|
|
71
|
+
"when": 1737677651577,
|
|
72
|
+
"tag": "0009_odd_metal_master",
|
|
73
|
+
"breakpoints": true
|
|
60
74
|
}
|
|
61
75
|
]
|
|
62
76
|
}
|
package/db/schema.ts
CHANGED
|
@@ -25,20 +25,20 @@ export const users = sqliteTable(
|
|
|
25
25
|
profileImage: text('profile_image'),
|
|
26
26
|
userPhotoId: text('user_photo_id'),
|
|
27
27
|
userPhotoUrl: text('user_photo_url'),
|
|
28
|
-
gender: text('gender'),
|
|
29
|
-
day: integer('day'), // Day of birth
|
|
30
|
-
month: integer('month'), // Month of birth
|
|
31
|
-
year: integer('year'), // Year of birth
|
|
32
|
-
hour: integer('hour'), //
|
|
33
|
-
min: integer('min'), //
|
|
34
|
-
latitude: real('latitude'),
|
|
35
|
-
longitude: real('longitude'),
|
|
36
|
-
tzone: real('tzone'),
|
|
37
|
-
instagramUsername: text('instagram_username'),
|
|
38
|
-
tiktokUsername: text('
|
|
39
|
-
credits_balance: integer('credits_balance'),
|
|
40
|
-
totalCreditsEarned: integer('total_credits_earned').default(0),
|
|
41
|
-
lastTransactionAt: integer('last_transaction_at', { mode: 'timestamp' }),
|
|
28
|
+
gender: text('gender'), // Nullable for optional disclosure
|
|
29
|
+
day: integer('day').notNull(), // Day of birth
|
|
30
|
+
month: integer('month').notNull(), // Month of birth
|
|
31
|
+
year: integer('year').notNull(), // Year of birth
|
|
32
|
+
hour: integer('hour'), // Nullable for unknown birth hour
|
|
33
|
+
min: integer('min'), // Nullable for unknown birth minute
|
|
34
|
+
latitude: real('latitude').notNull(),
|
|
35
|
+
longitude: real('longitude').notNull(),
|
|
36
|
+
tzone: real('tzone'), // Nullable for inferred timezone
|
|
37
|
+
instagramUsername: text('instagram_username'), // Nullable for optional social media
|
|
38
|
+
tiktokUsername: text('tiktok_username'), // Fix typo
|
|
39
|
+
credits_balance: integer('credits_balance').default(0).notNull(),
|
|
40
|
+
totalCreditsEarned: integer('total_credits_earned').default(0).notNull(),
|
|
41
|
+
lastTransactionAt: integer('last_transaction_at', { mode: 'timestamp' }), // Nullable for no transactions
|
|
42
42
|
...timestampFields,
|
|
43
43
|
},
|
|
44
44
|
(t) => [index('users_email_idx').on(t.email)]
|
|
@@ -115,6 +115,26 @@ export const astroFeatures = sqliteTable(
|
|
|
115
115
|
(t) => [index('astro_features_user_id_idx').on(t.userId)]
|
|
116
116
|
);
|
|
117
117
|
|
|
118
|
+
export const astroAspects = sqliteTable(
|
|
119
|
+
'astro_aspects',
|
|
120
|
+
{
|
|
121
|
+
id: text('id').primaryKey(), // Unique identifier for the aspect
|
|
122
|
+
userId: text('user_id')
|
|
123
|
+
.notNull()
|
|
124
|
+
.references(() => users.id, { onDelete: 'cascade' }), // Links to the user
|
|
125
|
+
aspectingPlanet: text('aspecting_planet').notNull(), // E.g., "Sun"
|
|
126
|
+
aspectedPlanet: text('aspected_planet').notNull(), // E.g., "Mercury"
|
|
127
|
+
aspectingPlanetId: integer('aspecting_planet_id').notNull(), // Index of the aspecting planet
|
|
128
|
+
aspectedPlanetId: integer('aspected_planet_id').notNull(), // Index of the aspected planet
|
|
129
|
+
type: text('type').notNull(), // E.g., "Conjunction", "Square"
|
|
130
|
+
orb: real('orb').notNull(), // Orb value
|
|
131
|
+
diff: real('diff').notNull(), // Difference value
|
|
132
|
+
},
|
|
133
|
+
(t) => [
|
|
134
|
+
index('astro_aspects_user_id_idx').on(t.userId), // Index for efficient user queries
|
|
135
|
+
]
|
|
136
|
+
);
|
|
137
|
+
|
|
118
138
|
export const concepts = sqliteTable(
|
|
119
139
|
'concepts',
|
|
120
140
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zodic/shared",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.26",
|
|
4
4
|
"module": "index.ts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"migrate-latest": "wrangler d1 execute DB --file=$(ls -t ./db/migrations/*.sql | head -n 1) --remote",
|
|
12
12
|
"db:generate": "drizzle-kit generate",
|
|
13
13
|
"db:up": "drizzle-kit up",
|
|
14
|
-
"
|
|
14
|
+
"pub": "npm run db:generate && npm run db:up && npm run migrate-latest && npm publish"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@types/inversify": "^2.0.33",
|