diff --git a/dynamodb/dynamodb.sim.w b/dynamodb/dynamodb.sim.w index ab2628ff..745623f6 100644 --- a/dynamodb/dynamodb.sim.w +++ b/dynamodb/dynamodb.sim.w @@ -139,6 +139,10 @@ pub class Table_sim impl dynamodb_types.ITable { return nil; })(); + // delete the table if it already exists because we might be reusing the container + try { client.deleteTable({ TableName: tableName }); } + catch e { } + util.waitUntil(() => { try { client.createTable({ diff --git a/dynamodb/package.json b/dynamodb/package.json index 8f8a931e..b0593a31 100644 --- a/dynamodb/package.json +++ b/dynamodb/package.json @@ -1,6 +1,6 @@ { "name": "@winglibs/dynamodb", - "version": "0.1.0", + "version": "0.1.1", "description": "DynamoDB library for Wing", "author": { "name": "Cristian Pallarés",