--
※ この募集は締め切られました。
python djangoのstripe webhookのエラー解消
【教えてもらいたいこと】
プログラミング/サーバーサイド, Python
【利用目的】
技術的な質問・相談
【具体的な相談内容】
pythonのdjangoでstripeのwebhookを作成しています。
下記エラー出てしまい困っています。
django.db.utils.ProgrammingError: column "user_id" is of type uuid but expression is of type integer
LINE 1: ...tripeCustomerId", "stripeSubscriptionId") VALUES (1, 'c83497...
^
HINT: You will need to rewrite or cast the expression.
下記でmigrateしようとしましたが、えらーになります。
# Generated by Django 4.2.3 on 2023-08-26 09:11
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('register', '0009_stripecustomer'),
]
operations = [
migrations.AlterField(
model_name='stripecustomer',
name='id',
field=models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False),
),
migrations.AlterField(
model_name='stripecustomer',
name='user',
field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
),
]
エラー
django.db.utils.ProgrammingError: cannot cast type bigint to uuid
LINE 1: ...stripecustomer" ALTER COLUMN "id" TYPE uuid USING "id"::uuid
migrateが絡み怖いので、至急サポートしていただきたいです。
私はレベルとしてはrubyを中級レベルで
pythonはAI実装はできますが、djangoが初心者です。
ご協力のほど宜しくお願いいたします。
【希望相談スタイル】
ビデオ通話
【目安予算】
5000円