Last active
August 29, 2015 14:10
-
-
Save feighter09/f67ef69d9227ef3d89c7 to your computer and use it in GitHub Desktop.
Add many Parse columns at once
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Populate the array with subarrays of [ColumnName, ColumnType] | |
// where columnType is one of: ["String", "Number", "Boolean", "Date", "File", "GeoPoint", "Array", "Object", "Pointer", "Relation"] | |
// Then, navigate to your Parse data class, copy paste this code into the console and hit enter | |
// populating this list will be very tedious if you do not take advantage of an awesome text editor like Sublime Text | |
var array = [["pooper", "String"], ["poopsToday", "Number"]] | |
var i = 0 | |
function addColumn() | |
{ | |
if (i < array.length) { | |
var columnName = array[i][0] | |
var columnType = array[i++][1] | |
console.log("Adding: " + columnName + ", type: " + columnType) | |
$(".new_column").click() | |
$("input[name='name']").val(columnName) | |
$("select[name='type']").val(columnType) | |
$(".buttons button").click() | |
setTimeout(addColumn, 1000) | |
} | |
} | |
addColumn() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment