diff --git a/db/migrations/1709038872405-Data.js b/db/migrations/1709203295169-Data.js similarity index 95% rename from db/migrations/1709038872405-Data.js rename to db/migrations/1709203295169-Data.js index 91da2a288..04dbec27e 100644 --- a/db/migrations/1709038872405-Data.js +++ b/db/migrations/1709203295169-Data.js @@ -1,5 +1,5 @@ -module.exports = class Data1709038872405 { - name = 'Data1709038872405' +module.exports = class Data1709203295169 { + name = 'Data1709203295169' async up(db) { await db.query(`CREATE TABLE "amm_curve" ("id" character varying NOT NULL, "token_id" character varying, "burned_by_amm" numeric NOT NULL, "minted_by_amm" numeric NOT NULL, "amm_slope_parameter" numeric NOT NULL, "amm_init_price" numeric NOT NULL, "finalized" boolean NOT NULL, CONSTRAINT "PK_477b83cf84964aa40f38edf1db1" PRIMARY KEY ("id"))`) @@ -27,8 +27,9 @@ module.exports = class Data1709038872405 { await db.query(`CREATE INDEX "IDX_5c5d611ec29439dc91eeea287b" ON "sale" ("token_id", "created_in") `) await db.query(`CREATE TABLE "benefit" ("id" character varying NOT NULL, "token_id" character varying, "emoji_code" text, "title" text NOT NULL, "description" text NOT NULL, "display_order" integer NOT NULL, CONSTRAINT "Benefit_token_displayOrder" UNIQUE ("token_id", "display_order") DEFERRABLE INITIALLY DEFERRED, CONSTRAINT "PK_c024dccb30e6f4702adffe884d1" PRIMARY KEY ("id"))`) await db.query(`CREATE INDEX "IDX_77ac3c1669ee14648626b078f9" ON "benefit" ("token_id", "display_order") `) - await db.query(`CREATE TABLE "creator_token" ("id" character varying NOT NULL, "status" character varying(6) NOT NULL, "avatar" jsonb, "total_supply" numeric NOT NULL, "symbol" text, "is_invite_only" boolean NOT NULL, "annual_creator_reward_permill" integer NOT NULL, "revenue_share_ratio_permill" integer NOT NULL, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL, "description" text, "whitelist_applicant_note" text, "whitelist_applicant_link" text, "accounts_num" integer NOT NULL, "number_of_revenue_share_activations" integer NOT NULL, "deissued" boolean NOT NULL, "current_amm_sale_id" character varying, "current_sale_id" character varying, "current_renvenue_share_id" character varying, "number_of_vested_transfer_issued" integer NOT NULL, "last_price" numeric, CONSTRAINT "PK_abbc66d13ff7d3828e4c830d325" PRIMARY KEY ("id"))`) + await db.query(`CREATE TABLE "creator_token" ("id" character varying NOT NULL, "status" character varying(6) NOT NULL, "avatar" jsonb, "total_supply" numeric NOT NULL, "is_featured" boolean NOT NULL, "symbol" text, "is_invite_only" boolean NOT NULL, "annual_creator_reward_permill" integer NOT NULL, "revenue_share_ratio_permill" integer NOT NULL, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL, "description" text, "whitelist_applicant_note" text, "whitelist_applicant_link" text, "accounts_num" integer NOT NULL, "number_of_revenue_share_activations" integer NOT NULL, "deissued" boolean NOT NULL, "current_amm_sale_id" character varying, "current_sale_id" character varying, "current_renvenue_share_id" character varying, "number_of_vested_transfer_issued" integer NOT NULL, "last_price" numeric, CONSTRAINT "PK_abbc66d13ff7d3828e4c830d325" PRIMARY KEY ("id"))`) await db.query(`CREATE INDEX "IDX_790a6fc1f7aad3711c0672bb6b" ON "creator_token" ("symbol") `) + await db.query(`CREATE INDEX "IDX_64480ef90bda6c11650c3f4279" ON "creator_token" ("created_at") `) await db.query(`CREATE INDEX "IDX_aabe40376c0eb47772b52780b1" ON "creator_token" ("current_amm_sale_id") `) await db.query(`CREATE INDEX "IDX_5eca884f8728ff8f0c6a389c24" ON "creator_token" ("current_sale_id") `) await db.query(`CREATE INDEX "IDX_e30b9944186aeb1e86707e1705" ON "creator_token" ("current_renvenue_share_id") `) @@ -100,6 +101,7 @@ module.exports = class Data1709038872405 { await db.query(`DROP INDEX "public"."IDX_77ac3c1669ee14648626b078f9"`) await db.query(`DROP TABLE "creator_token"`) await db.query(`DROP INDEX "public"."IDX_790a6fc1f7aad3711c0672bb6b"`) + await db.query(`DROP INDEX "public"."IDX_64480ef90bda6c11650c3f4279"`) await db.query(`DROP INDEX "public"."IDX_aabe40376c0eb47772b52780b1"`) await db.query(`DROP INDEX "public"."IDX_5eca884f8728ff8f0c6a389c24"`) await db.query(`DROP INDEX "public"."IDX_e30b9944186aeb1e86707e1705"`) diff --git a/db/migrations/1709038872576-Views.js b/db/migrations/1709203295214-Views.js similarity index 91% rename from db/migrations/1709038872576-Views.js rename to db/migrations/1709203295214-Views.js index 16b6b0264..3e7fec1aa 100644 --- a/db/migrations/1709038872576-Views.js +++ b/db/migrations/1709203295214-Views.js @@ -1,7 +1,8 @@ + const { getViewDefinitions } = require('../viewDefinitions') -module.exports = class Views1709038872576 { - name = 'Views1709038872576' +module.exports = class Views1709203295214 { + name = 'Views1709203295214' async up(db) { const viewDefinitions = getViewDefinitions(db); diff --git a/src/mappings/token/index.ts b/src/mappings/token/index.ts index 49d10cddf..18de16001 100644 --- a/src/mappings/token/index.ts +++ b/src/mappings/token/index.ts @@ -65,6 +65,7 @@ export async function processTokenIssuedEvent({ isInviteOnly: transferPolicy.__kind === 'Permissioned', accountsNum: 0, // will be uptdated as account are added deissued: false, + isFeatured: false, numberOfVestedTransferIssued: 0, numberOfRevenueShareActivations: 0, })