Skip to content

Commit

Permalink
Add test migration
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoerdbeentjes committed Oct 2, 2024
1 parent 7cd813e commit 48b4f3f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions migrations/1727855666_test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Client } from "@datocms/cli/lib/cma-client-node";

export default async function (client: Client): Promise<void> {
const articleModel = await client.itemTypes.create({
name: "Article",
api_key: "article",
});

await client.fields.create(articleModel, {
label: "Title",
api_key: "title",
field_type: "string",
validators: {
required: {},
},
});
}

0 comments on commit 48b4f3f

Please sign in to comment.