Reads the schema from Bolt\Storage\Database\Schema\Manager and creates mapping data.
191543
public function initialize()
    {
        $this->initializeShortAliases();
        $this->initializeDefaultAliases();
        foreach ($this->schemaManager->getSchemaTables() as $table) {
            $this->loadMetadataForTable($table);
        }
        $this->initialized = true;
    }
1049385
public function getMetadata()
    {
        $schema = array();
        foreach ($this->from as $path) {
            if (is_dir($path)) {
                $files = glob($path . '/*.yml');
                foreach ($files as $file) {
                    $schema = array_merge($schema, (array) Yaml::parse(file_get_contents($file)));
                }
            } else {
                $schema = array_merge($schema, (array) Yaml::parse(file_get_contents($path)));
            }
        }

        $metadatas = array();
        foreach ($schema as $className => $mappingInformation) {
            $metadatas[] = $this->convertToClassMetadataInfo($className, $mappingInformation);
        }

        return $metadatas;
    }
1005768
protected function recreateSchema()
    {
        $schemaTool = $this->getSchemaTool();
        $schemaTool->dropSchema();
        $schemaTool->createSchema();
        $this->logDebug('Recreated Schema');
    }
1019386
protected function initialize()
    {
        $this->schemaDomainMap = array();
        foreach (PropelTypes::getPropelTypes() as $type) {
            $this->schemaDomainMap[$type] = new Domain($type);
        }
        // BU_* no longer needed, so map these to the DATE/TIMESTAMP domains
        $this->schemaDomainMap[PropelTypes::BU_DATE] = new Domain(PropelTypes::DATE);
        $this->schemaDomainMap[PropelTypes::BU_TIMESTAMP] = new Domain(PropelTypes::TIMESTAMP);

        // Boolean is a bit special, since typically it must be mapped to INT type.
        $this->schemaDomainMap[PropelTypes::BOOLEAN] = new Domain(PropelTypes::BOOLEAN, "INTEGER");
    }
700097
public function getAllMetadata()
    {
        $schema   = $this->schemaGenerator->parse($this->jsonConfig->getFile($this->config));
        $filePath = Installer::getDirectory(Installer::TMP) . 'schema.json';

        file_put_contents($filePath, $schema->toString());

        $collection = new MetaDataCollection();

        if ($this->isFirstLevelIsDto($schema) === true) {
            $metadata = $this->createMetadata('master');
            $metadata = $this->hydrateProperties($schema->getProperties(), $metadata, $collection);
            $collection->append($metadata);
        } else {
            // each proporties is considered as metadata
            foreach ($schema->getProperties() as $propName => $prop) {
                if (count($prop->getProperties()) === 0) { // No column, the relation replace column
                    foreach ($prop->getItems() as $itemValue) {
                        /* @var $itemValue \JSONSchema\Structure\Item */
                        $metadata = $this->createMetadata($propName);
                        $metadata = $this->hydrateProperties($itemValue->getProperties(), $metadata, $collection);
                        $collection->append($metadata);
                    }
                } else { // have column, hydrate them
                    $metadata = $this->createMetadata($propName);
                    $metadata = $this->hydrateProperties($prop->getProperties(), $metadata, $collection);
                    $metadata = $this->hydrateItems($propName, $prop->getItems(), $metadata, $collection);
                    $collection->append($metadata);
                }
            }
        }

        return $collection;
    }
757722
public function create()
    {
        $class = $this->getClass();
        $contentType = new $class();

        $schema = $this->schemaManager->create();
        $schema->setObjectClass($this->contentManager->getClass());

        $contentType->setSchema($schema);

        return $contentType;
    }
1161391
public function getSchema(): ?Builder
    {
        if (!$this->hasSchema()) {
            $this->setSchema($this->getDefaultSchema());
        }
        return $this->schema;
    }
1364356
protected function createSchema()
    {
        $schema = new ModelSchema("tblAuthenticationRole");
        $schema->addColumn(
            new AutoIncrementColumn("RoleID"),
            new StringColumn("RoleName", 40)
        );

        $schema->labelColumnName = "RoleName";

        return $schema;
    }
1104598
protected function createSchema()
    {
        $schema = new ModelSchema("tblMenuItem");

        $schema->addColumn(
            new AutoIncrementColumn("MenuItemID"),
            new ForeignKeyColumn("ParentMenuItemID", 0),
            new ForeignKeyColumn('MenuID', 0),
            new StringColumn("MenuName", 50),
            new StringColumn("Url", 200),
            new StringColumn("SecurityOption", 200),
            new StringColumn("ParentMenuItemIDs", 200),
            new StringColumn("CssClassName", 40),
            new IntegerColumn("Position", 0)
        );

        return $schema;
    }
376657
def create_schema_from_xsd_directory(directory, version):
    
    schema = Schema(version)
    for f in _get_xsd_from_directory(directory):
        logger.info("Loading schema %s" % f)
        fill_schema_from_xsd_file(f, schema)
    return schema
47628
def schema(ctx, schema):
    
    data = yaml.load(schema)
    if not isinstance(data, (list, tuple)):
        data = [data]
    with click.progressbar(data, label=schema.name) as bar:
        for schema in bar:
            ctx.obj['grano'].schemata.upsert(schema)
1347439
public function generate_schema() {
		$schema = "CREATE TABLE `".$this->name."` (\n";
		
		for($i = 0; $i < count($this->details); $i++) {
			
			if(!isset($this->details[$i]['options'])) {
				$this->details[$i]['options'] = array();
			}
			
			$schema .= "`".$this->details[$i]['name']."` ";
			$schema .= $this->type($this->details[$i]);
			$schema .= $this->options($this->details[$i]['options']);
			$schema .= ",\n";
		}
		
		$schema .= $this->table_keys();
		$schema .= ')';
		$schema .= $this->engine();
		
		return $schema;
	}
1359570
function GetSchema() {
		$this->LoadSchema();
		$schema = array(
			'_model' => $this->model,
			'_table' => $this->table,
		);
		$schema = array_merge($schema, $this->schema);
		$schema['_id'] = $this->schema['_id']['field'];
		$this->Trigger('getschema', $schema);
		return $schema;
	}
56362
public function createRepository()
    {
        $schema = $this->connection->getSchemaBuilder();

        $schema->create($this->table, function ($table) {
            $table->string('migration');
            $table->string('extension')->nullable();
        });
    }
1362525
protected function createSchema()
    {
        $schema = new MySqlSchema("tblApplicationVersion");
        $schema->addColumn(
            new AutoIncrement("ApplicationVersionID"),
            new Decimal("Version"),
            new Enum("VersionStatus", "NotMigrated", ["NotMigrated", "Migrated", "Failed"]),
            new MediumText("FailureMessages")
        );

        return $schema;
    }
1285024
def create_schema(db):
    """"""
    schema_dir = pkg_resources.resource_filename('git_code_debt', 'schema')
    schema_files = os.listdir(schema_dir)

    for sql_file in schema_files:
        resource_filename = os.path.join(schema_dir, sql_file)
        with open(resource_filename, 'r') as resource:
            db.executescript(resource.read())
1304137
function GetSchema()
	{
		$this->Connection->Connect();
		
		$schema = new DBSchema($this);
		
		$this->Connection->Disconnect();
		
		return $schema;
	}