applying migrations... PostgresError: column "x" cannot be cast automatically to type x
when I modify a column from type text to enum
to this
I got this error
How do I fix this?
to this
I got this error
How do I fix this?
export const channelSubscriptionsTable = pgTable("channel_subscriptions", {
...
subscription_type: text("subscription_type"),
});export const subscriptionTypeEnum = pgEnum("subscription_type", [
"free",
"paid",
]);
export const channelSubscriptionsTable = pgTable("channel_subscriptions", {
...
subscription_type: subscriptionTypeEnum("subscription_type")
}); severity_local: 'ERROR',
severity: 'ERROR',
code: '42804',
hint: 'You might need to specify "USING subscription_type::subscription_type".',
file: 'tablecmds.c',
line: '12310',
routine: 'ATPrepAlterColumnType'