Rename Money/Url to Currency/Link and remove snake_case from composite fields (#2536)
* Rename Money/Url to Currency/Link * regenerate front types * renaming money/url field types * fix double text * fix tests * fix server tests * fix generate-target-column-map * fix currency convert * fix: tests --------- Co-authored-by: Jérémy Magrin <jeremy.magrin@gmail.com>
This commit is contained in:
@ -0,0 +1,15 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- The `currency` column on the `pipelines` table would be dropped and recreated. This will lead to data loss if there is data in the column.
|
||||
|
||||
*/
|
||||
-- CreateEnum
|
||||
CREATE TYPE "CurrencyCode" AS ENUM ('AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AUD', 'AWG', 'AZN', 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BOV', 'BRL', 'BSD', 'BTN', 'BWP', 'BYN', 'BZD', 'CAD', 'CDF', 'CHF', 'CLF', 'CLP', 'CNY', 'COP', 'COU', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', 'DOP', 'DZD', 'EGP', 'ERN', 'ETB', 'EUR', 'FJD', 'FKP', 'GBP', 'GEL', 'GHS', 'GIP', 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', 'ILS', 'INR', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'JPY', 'KES', 'KGS', 'KHR', 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRO', 'MRU', 'MUR', 'MVR', 'MWK', 'MXN', 'MXV', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDD', 'SDG', 'SEK', 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', 'STD', 'STN', 'SVC', 'SYP', 'SZL', 'THB', 'TJS', 'TMM', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', 'UGX', 'USD', 'UYU', 'UZS', 'VEF', 'VES', 'VND', 'VUV', 'WST', 'XAF', 'XCD', 'XOF', 'XPF', 'XSU', 'XUA', 'YER', 'ZAR', 'ZMW', 'ZWL');
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "pipelines" DROP COLUMN "currency",
|
||||
ADD COLUMN "currency" "CurrencyCode" NOT NULL DEFAULT 'USD';
|
||||
|
||||
-- DropEnum
|
||||
DROP TYPE "Currency";
|
||||
@ -446,7 +446,7 @@ model ActivityTarget {
|
||||
}
|
||||
|
||||
// All of the world's currently active currencies based on the ISO 4217 standard
|
||||
enum Currency {
|
||||
enum CurrencyCode {
|
||||
AED
|
||||
AFN
|
||||
ALL
|
||||
@ -615,6 +615,8 @@ enum Currency {
|
||||
ZAR
|
||||
ZMW
|
||||
ZWL
|
||||
|
||||
@@map("CurrencyCode")
|
||||
}
|
||||
|
||||
model Pipeline {
|
||||
@ -640,7 +642,7 @@ model Pipeline {
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
currency Currency @default(USD)
|
||||
currency CurrencyCode @default(USD)
|
||||
|
||||
@@map("pipelines")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user