Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions backend/cmd/db/clone_prod/playground-1.mongodb.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/* global use, db */
// MongoDB Playground
// Use Ctrl+Space inside a snippet or a string literal to trigger completions.

const database = 'Featurethon';
const collection = 'NEW_COLLECTION_NAME';

// The current database to use.
use(database);

// Create a new collection.
db.createCollection('menuItems');
db.createCollection('restaurants');
db.createCollection('reviews');
db.createCollection('users');
db.createCollection('passwordResets');

// The prototype form to create a collection:
/* db.createCollection( <name>,
{
capped: <boolean>,
autoIndexId: <boolean>,
size: <number>,
max: <number>,
storageEngine: <document>,
validator: <document>,
validationLevel: <string>,
validationAction: <string>,
indexOptionDefaults: <document>,
viewOn: <string>,
pipeline: <pipeline>,
collation: <document>,
writeConcern: <document>,
timeseries: { // Added in MongoDB 5.0
timeField: <string>, // required for time series collections
metaField: <string>,
granularity: <string>,
bucketMaxSpanSeconds: <number>, // Added in MongoDB 6.3
bucketRoundingSeconds: <number>, // Added in MongoDB 6.3
},
expireAfterSeconds: <number>,
clusteredIndex: <document>, // Added in MongoDB 5.3
}
)*/

// More information on the `createCollection` command can be found at:
// https://www.mongodb.com/docs/manual/reference/method/db.createCollection/
2 changes: 1 addition & 1 deletion backend/cmd/db/clone_prod/script.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
read -p "Enter New Environment Name: " name
read -p "Enter New Environment Name " name
go run cmd/db/clone_prod/main.go -name $name
Binary file not shown.
Binary file not shown.
Loading
Loading